Browse Source

Fix detecting single utf character 'is too long'

mingodad 4 years ago
parent
commit
10cc021e47
1 changed files with 2 additions and 2 deletions
  1. 2 2
      SquiLu/squirrel/sqlexer.cpp

+ 2 - 2
SquiLu/squirrel/sqlexer.cpp

@@ -670,13 +670,13 @@ try_again:
 #ifdef SQUNICODE
 #ifdef SQUNICODE
 #if WCHAR_SIZE == 2
 #if WCHAR_SIZE == 2
                         utf_value = scstrtoul(temp, &stemp, 16);
                         utf_value = scstrtoul(temp, &stemp, 16);
-                        utf_len += AddUTF16(utf_value);
+                        utf_len = AddUTF16(utf_value);
 #else
 #else
                         ADD_CHAR((SQChar)scstrtoul(temp, &stemp, 16));
                         ADD_CHAR((SQChar)scstrtoul(temp, &stemp, 16));
 #endif
 #endif
 #else
 #else
                         utf_value = scstrtoul(temp, &stemp, 16);
                         utf_value = scstrtoul(temp, &stemp, 16);
-                        utf_len += AddUTF8(utf_value);
+                        utf_len = AddUTF8(utf_value);
 #endif
 #endif
 					}
 					}
 				    break;
 				    break;