Skip to content

Commit

Permalink
Fix if
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Sep 6, 2023
1 parent 3f563fc commit bbbabde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parser/lexer/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func unescape(value string) (string, error) {
// The string contains escape characters.
// The following logic is adapted from `strconv/quote.go`
var runeTmp [utf8.UTFMax]byte
if n >= 2/3*math.MaxInt {
if n >= 2*math.MaxInt/3 {
return "", fmt.Errorf("too large string")
}
buf := make([]byte, 0, 3*n/2)
Expand Down

0 comments on commit bbbabde

Please sign in to comment.