2
0
Эх сурвалжийг харах

[hl] constant string length fix for non-bmp characters

Aurel Bílý 6 жил өмнө
parent
commit
09a0d1efcd

+ 1 - 1
src/generators/genhl.ml

@@ -172,7 +172,7 @@ let to_utf8 str p =
 		let c = UChar.code c in
 		if (c >= 0xD800 && c <= 0xDFFF) || c >= 0x110000 then abort "Invalid unicode char" p;
 		incr ccount;
-		if c > 0x10000 then incr ccount;
+		if c >= 0x10000 then incr ccount;
 	) u8;
 	u8, !ccount