Skip to content

Commit

Permalink
Fix value mistakenly prsed as number
Browse files Browse the repository at this point in the history
  • Loading branch information
iliakap committed Mar 19, 2024
1 parent 4653a1b commit 453f081
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion token/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ func getNumberStat(str string) *numStat {
for idx, c := range str {
switch c {
case 'x':
if (isNegative && idx == 2) || (!isNegative && idx == 1) {
if (isNegative && idx == 2 && str[1] == '0') || (!isNegative && idx == 1 && str[0] == '0') {
continue
}
case 'o':
Expand Down

0 comments on commit 453f081

Please sign in to comment.