From 2ee5eb4dd6bb47407ce26d66a719eb2ea011b625 Mon Sep 17 00:00:00 2001 From: Akuli Date: Sat, 11 Feb 2023 02:26:48 +0200 Subject: [PATCH] Fix line endings --- src/tokenize.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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];