diff options
-rw-r--r-- | stdlib/string.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/string.ml b/stdlib/string.ml index 851271763..5e4f36a21 100644 --- a/stdlib/string.ml +++ b/stdlib/string.ml @@ -155,7 +155,7 @@ let rec rindex_rec s i c = let rindex s c = rindex_rec s (length s - 1) c;; let rindex_from s i c = - if i < 0 || i >= length s then invalid_arg "String.rindex_from" else + if i < -1 || i >= length s then invalid_arg "String.rindex_from" else rindex_rec s i c;; let contains_from s i c = |