Skip to content

Commit

Permalink
fix out of range panic
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Korczynski <[email protected]>
  • Loading branch information
AdamKorcz committed Jul 22, 2024
1 parent 237df0e commit ac805ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func Integer(tk *token.Token) *IntegerNode {
}
negativePrefix = "-"
} else {
if value[1] == 'o' {
if len(value) >= 2 && value[1] == 'o' {
skipCharacterNum++
}
}
Expand Down

0 comments on commit ac805ee

Please sign in to comment.