diff options
-rw-r--r-- | byterun/ints.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/byterun/ints.c b/byterun/ints.c index 2893b6988..3742174b5 100644 --- a/byterun/ints.c +++ b/byterun/ints.c @@ -65,7 +65,7 @@ static long parse_long(char * p) p = parse_sign_and_base(p, &base, &sign); d = parse_digit(p); - if (d < 0) failwith("int_of_string"); + if (d < 0 || d >= base) failwith("int_of_string"); for (p++, res = d; /*nothing*/; p++) { d = parse_digit(p); if (d < 0 || d >= base) break; |