bugfix in CCString.find

This commit is contained in:
Simon Cruanes 2015-09-27 17:58:59 +02:00
parent df39602b9e
commit a3bc61ef94

View file

@ -94,7 +94,7 @@ let find ?(start=0) ~sub s =
let n = String.length sub in
let i = ref start in
try
while !i + n < String.length s do
while !i + n <= String.length s do
if _is_sub ~sub 0 s !i ~len:n then raise Exit;
incr i
done;