Skip to content

Commit

Permalink
Fix line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed Feb 11, 2023
1 parent e068eab commit 2ee5eb4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/tokenize.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 2ee5eb4

Please sign in to comment.