2
0
Эх сурвалжийг харах

no error when pos + len outside of string range in utf8_sub

Nicolas Cannasse 11 жил өмнө
parent
commit
31104f244f
1 өөрчлөгдсөн 0 нэмэгдсэн , 1 устгасан
  1. 0 1
      interp.ml

+ 0 - 1
interp.ml

@@ -1776,7 +1776,6 @@ let std_lib =
 				incr pos;
 				if !pos >= p && !pos < p + l then UTF8.Buf.add_char buf c;
 			) (vstring s);
-			if !pos < p + l then error();
 			VString (UTF8.Buf.contents buf)
 		);
 		"utf8_get", Fun2 (fun s p ->