giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.29k stars 457 forks source link

fixed html paste #2474

Closed VladislavGrudinin closed 3 months ago

VladislavGrudinin commented 3 months ago

For a valid html, _tag_styles.back() will be called on empty std::list, which is undefined behavior. https://en.cppreference.com/w/cpp/container/list/back

When I paste 'text/html' content into cherrytree, the assert is triggered in libc++ (llvm libcxx compiled with -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE)

giuspen commented 3 months ago

Thanks @VladislavGrudinin