Procházet zdrojové kódy

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

Aurel Bílý před 6 roky
rodič
revize
09a0d1efcd
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/generators/genhl.ml

+ 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