Skip to content

Commit

Permalink
Support filtering number literals in bases other than decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
jgautheron committed Aug 28, 2023
1 parent d840a14 commit fd5a494
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ func (p *Parser) ProcessResults() {
}

// If the value is a number
if i, err := strconv.Atoi(str); err == nil {
if p.numberMin != 0 && i < p.numberMin {
if i, err := strconv.ParseInt(str, 0, 0); err == nil {
if p.numberMin != 0 && i < int64(p.numberMin) {
delete(p.strs, str)
}
if p.numberMax != 0 && i > p.numberMax {
if p.numberMax != 0 && i > int64(p.numberMax) {
delete(p.strs, str)
}
}
Expand Down

0 comments on commit fd5a494

Please sign in to comment.