diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1999-05-15 17:06:56 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1999-05-15 17:06:56 +0000 |
commit | 57acfa7dec1f89d213d22dfc4544445bbeceb4cd (patch) | |
tree | f9732450ab7cc31d13e3f514e478a21997ab095e | |
parent | dbc3d62830c08537751d0b146704e99aa14ba288 (diff) |
Dans create, s'assurer que la taille est > 0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2374 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | stdlib/buffer.ml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/stdlib/buffer.ml b/stdlib/buffer.ml index 63167d151..f020b836a 100644 --- a/stdlib/buffer.ml +++ b/stdlib/buffer.ml @@ -18,6 +18,7 @@ type t = initial_buffer : string} let create n = + if n <= 0 then invalid_arg "Buffer.create"; let s = String.create n in {buffer = s; position = 0; length = String.length s; initial_buffer = s} |