Fix GetWordEnd type of functions to make sure range.max is past the last index even on buffer end

This commit is contained in:
Krzosa Karol
2024-08-04 08:54:08 +02:00
parent 3f16888fe0
commit ffb38664b8
4 changed files with 37 additions and 5 deletions

View File

@@ -19,6 +19,7 @@ bool IsSymbol(wchar_t w) {
}
bool IsNonWord(wchar_t w) {
if (w == '_') return false;
bool result = IsSymbol(w) || IsWhitespace(w);
return result;
}