Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

int_of_string #2607

Closed
vicuna opened this issue Nov 7, 2000 · 1 comment
Closed

int_of_string #2607

vicuna opened this issue Nov 7, 2000 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 7, 2000

Original bug ID: 219
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: c'est dans mon adresse
Version: 3.00
OS: tru64XX
Submission from: oto.inria.fr (192.93.2.2)

    Objective Caml version 3.00

print_endline (Printf.sprintf "0o%o\n" (int_of_string "0o8899"));;

0o11121

  • : unit = ()

On attendrait Invalid Argument ou une autre exception, non ?

Fix: Par exemple, dans byterun/int.c, fn parse_long:
p = parse_sign_and_base(p, &base, &sign);
d = parse_digit(p);
if (d < 0) failwith("int_of_string");
peut-etre que:
if (d < 0 || d >= *base) failwith...
suffirait.

Merci!

@vicuna
Copy link
Author

vicuna commented Nov 7, 2000

Comment author: administrator

Duplicate of #2606

@vicuna vicuna closed this as completed Aug 25, 2002
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant