From fd5a49479b19e8b7011b33f285a12cf61b721464 Mon Sep 17 00:00:00 2001 From: Jonathan Gautheron Date: Mon, 28 Aug 2023 11:31:34 +0200 Subject: [PATCH] Support filtering number literals in bases other than decimals --- parser.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parser.go b/parser.go index 2ed7a9a..c1edd4c 100644 --- a/parser.go +++ b/parser.go @@ -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) } }