From a9999a864602fa91d673a47b7d37ced986322917 Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Wed, 28 Feb 2024 09:58:19 +0100 Subject: [PATCH] +fix: fixing run-time problem of stack corruption --- lexilla/lexers_x/LexKotlin.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lexilla/lexers_x/LexKotlin.cxx b/lexilla/lexers_x/LexKotlin.cxx index 67ada68f7..200fbecb2 100644 --- a/lexilla/lexers_x/LexKotlin.cxx +++ b/lexilla/lexers_x/LexKotlin.cxx @@ -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 {