Closed davide125 closed 2 years ago
last_char can become negative here, which can result in attempting to index the string at an invalid position, which leads to
last_char
/usr/include/c++/12/bits/basic_string.h:1201: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = unsigned int; _Traits = std::char_traits<unsigned int>; _Alloc = std::allocator<unsigned int>; const_reference = const unsigned int&; size_type = long unsigned int]: Assertion '__pos <= size()' failed. Aborted (core dumped)
last_char
can become negative here, which can result in attempting to index the string at an invalid position, which leads to