Skip to content

Commit fd5a494

Browse files
committed
Support filtering number literals in bases other than decimals
1 parent d840a14 commit fd5a494

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

parser.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ func (p *Parser) ProcessResults() {
9999
}
100100

101101
// If the value is a number
102-
if i, err := strconv.Atoi(str); err == nil {
103-
if p.numberMin != 0 && i < p.numberMin {
102+
if i, err := strconv.ParseInt(str, 0, 0); err == nil {
103+
if p.numberMin != 0 && i < int64(p.numberMin) {
104104
delete(p.strs, str)
105105
}
106-
if p.numberMax != 0 && i > p.numberMax {
106+
if p.numberMax != 0 && i > int64(p.numberMax) {
107107
delete(p.strs, str)
108108
}
109109
}

0 commit comments

Comments
 (0)