소스 검색

[eval] fix printing problem of objects that have unicode stuff

Simon Krajewski 6 년 전
부모
커밋
890baa0fd0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/macro/eval/evalPrinting.ml

+ 1 - 1
src/macro/eval/evalPrinting.ml

@@ -61,7 +61,7 @@ let rec s_object depth o =
 	) fields;
 	Buffer.add_string buf "}";
 	let s = Buffer.contents buf in
-	create_with_length s (UTF8.length s)
+	create_with_length s (try UTF8.length s with _ -> String.length s)
 
 and s_array depth va =
 	join rempty [