diff --git a/src/coders/lua_parsing.cpp b/src/coders/lua_parsing.cpp index 3c0d3a53..b3492bae 100644 --- a/src/coders/lua_parsing.cpp +++ b/src/coders/lua_parsing.cpp @@ -80,7 +80,7 @@ public: return std::string({first}); case '-': skip(1); - if (peekNoJump() == '-') { + if (hasNext() && peekNoJump() == '-') { skip(1); return "--"; } diff --git a/src/graphics/ui/elements/TextBox.cpp b/src/graphics/ui/elements/TextBox.cpp index 1e36c601..1daa590d 100644 --- a/src/graphics/ui/elements/TextBox.cpp +++ b/src/graphics/ui/elements/TextBox.cpp @@ -293,6 +293,7 @@ bool TextBox::eraseSelected() { } erase(selectionStart, selectionEnd-selectionStart); resetSelection(); + onInput(); return true; }