diff --git a/src/tokenize.c b/src/tokenize.c index 416aa0ff..da69e719 100644 --- a/src/tokenize.c +++ b/src/tokenize.c @@ -150,14 +150,14 @@ static long long parse_integer(const char *str, Location location, int nbits) digits = &str[2]; valid_digits = "01"; } else if (str[0] == '0' && str[1] == 'o') { - // 0o777 = octal number - base = 8; - digits = &str[2]; - valid_digits = "01234567"; - } else if (str[0] == '0' && str[1] != '\0') { - // wrong syntax like 0777 + // 0o777 = octal number + base = 8; + digits = &str[2]; + valid_digits = "01234567"; + } else if (str[0] == '0' && str[1] != '\0') { + // wrong syntax like 0777 fail_with_error(location, "unnecessary zero at start of number"); - } else { + } else { // default decimal umber base = 10; digits = &str[0];