Browse Source

Fix charCodeAt of haxe.Utf8 in macro interpretation

Use a proper function UTF8.get instead of UTF8.look
Ryusei Yamaguchi 12 years ago
parent
commit
607a95d960
1 changed files with 1 additions and 1 deletions
  1. 1 1
      interp.ml

+ 1 - 1
interp.ml

@@ -1764,7 +1764,7 @@ let std_lib =
 			VString (UTF8.Buf.contents buf)
 			VString (UTF8.Buf.contents buf)
 		);
 		);
 		"utf8_get", Fun2 (fun s p ->
 		"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 ->
 		"utf8_iter", Fun2 (fun s f ->
 			let ctx = get_ctx() in
 			let ctx = get_ctx() in