From 517829ae6a5e7a5b426ba6529668bde07fd2e7ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 08:28:49 +0000 Subject: [chore]: Bump github.com/tdewolff/minify/v2 from 2.12.7 to 2.12.8 (#2073) --- vendor/github.com/tdewolff/parse/v2/strconv/price.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vendor/github.com/tdewolff/parse/v2/strconv/price.go') diff --git a/vendor/github.com/tdewolff/parse/v2/strconv/price.go b/vendor/github.com/tdewolff/parse/v2/strconv/price.go index 94b38343e..18ded69f5 100644 --- a/vendor/github.com/tdewolff/parse/v2/strconv/price.go +++ b/vendor/github.com/tdewolff/parse/v2/strconv/price.go @@ -20,14 +20,14 @@ func AppendPrice(b []byte, price int64, dec bool, milSeparator byte, decSeparato // rounding if !dec { firstDec := (price / 10) % 10 - if firstDec >= 5 { + if 5 <= firstDec { price += 100 } } // calculate size n := LenInt(price) - 2 - if n > 0 { + if 0 < n { n += (n - 1) / 3 // mil separator } else { n = 1 @@ -38,7 +38,7 @@ func AppendPrice(b []byte, price int64, dec bool, milSeparator byte, decSeparato // resize byte slice i := len(b) - if i+n > cap(b) { + if cap(b) < i+n { b = append(b, make([]byte, n)...) } else { b = b[:i+n] @@ -66,7 +66,7 @@ func AppendPrice(b []byte, price int64, dec bool, milSeparator byte, decSeparato // print integer-part j := 0 - for price > 0 { + for 0 < price { if j == 3 { b[i] = milSeparator i-- -- cgit v1.3