Browse Source

Merge pull request #1978 from mandel59/bugfix-interp-utf8

Fix charCodeAt of haxe.Utf8 in macro interpretation
Nicolas Cannasse 12 năm trước cách đây
mục cha
commit
c66a916ca4
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      interp.ml

+ 2 - 2
interp.ml

@@ -1764,7 +1764,7 @@ let std_lib =
 			VString (UTF8.Buf.contents buf)
 		);
 		"utf8_get", Fun2 (fun s p ->
-			VInt (UChar.uint_code (try UTF8.look (vstring s) (vint p) with _ -> error()))
+			VInt (UChar.uint_code (try UTF8.get (vstring s) (vint p) with _ -> error()))
 		);
 		"utf8_iter", Fun2 (fun s f ->
 			let ctx = get_ctx() in
@@ -4567,4 +4567,4 @@ encode_expr_ref := encode_expr;
 decode_expr_ref := decode_expr;
 encode_clref_ref := encode_clref;
 enc_string_ref := enc_string;
-enc_hash_ref := enc_hash
+enc_hash_ref := enc_hash