diff options
Diffstat (limited to 'vendor/github.com/tdewolff/parse/v2/strconv/number.go')
| -rw-r--r-- | vendor/github.com/tdewolff/parse/v2/strconv/number.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vendor/github.com/tdewolff/parse/v2/strconv/number.go b/vendor/github.com/tdewolff/parse/v2/strconv/number.go index eb2a909b2..cc3014cdf 100644 --- a/vendor/github.com/tdewolff/parse/v2/strconv/number.go +++ b/vendor/github.com/tdewolff/parse/v2/strconv/number.go @@ -61,6 +61,9 @@ func AppendNumber(b []byte, num int64, dec int, groupSize int, groupSym rune, de // calculate size n := LenInt(num) + if sign == -1 { + n-- // ignore minux sign, add later + } if dec < n && 0 < groupSize && groupSym != 0 { n += utf8.RuneLen(groupSym) * (n - dec - 1) / groupSize } |
