float_of_string sur chaine vide (PR#1662)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5539 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
ca2bda6887
commit
370a1cbdc4
|
@ -120,6 +120,7 @@ CAMLprim value float_of_string(value vs)
|
|||
if (c != '_') *dst++ = c;
|
||||
}
|
||||
*dst = 0;
|
||||
if (dst == buf) failwith("float_of_string");
|
||||
d = strtod((const char *) buf, &end);
|
||||
if (buf != parse_buffer) stat_free(buf);
|
||||
if (end != dst) failwith("float_of_string");
|
||||
|
|
Loading…
Reference in New Issue