Răsfoiți Sursa

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

Simon Krajewski 6 ani în urmă
părinte
comite
890baa0fd0
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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;
 	) fields;
 	Buffer.add_string buf "}";
 	Buffer.add_string buf "}";
 	let s = Buffer.contents buf in
 	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 =
 and s_array depth va =
 	join rempty [
 	join rempty [