+fix: fixing run-time problem of stack corruption

This commit is contained in:
METANEOCORTEX\Kotti 2024-02-28 09:58:19 +01:00
parent 17509e8e22
commit a9999a8646

View File

@ -237,6 +237,7 @@ struct EscapeSequence {
int outerState = SCE_KOTLIN_DEFAULT;
int digitsLeft = 0;
bool brace = false;
// highlight any character as escape sequence.
bool resetEscapeState(int state, int chNext) noexcept {
@ -244,7 +245,8 @@ struct EscapeSequence {
return false;
}
outerState = state;
digitsLeft = (chNext == 'u') ? 5 : 1;
brace = false;
digitsLeft = (chNext == 'x') ? 3 : ((chNext == 'u') ? 5 : 1);
return true;
}
bool atEscapeEnd(int ch) noexcept {