mirror of
https://github.com/containers/skopeo.git
synced 2025-09-09 02:29:49 +00:00
fix(deps): update module github.com/containers/storage to v1.52.0
... and c/image/v5 to main Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
committed by
Miloslav Trmač
parent
6baa928c1b
commit
58ff9fdb27
14
vendor/go.mongodb.org/mongo-driver/bson/primitive/decimal.go
generated
vendored
14
vendor/go.mongodb.org/mongo-driver/bson/primitive/decimal.go
generated
vendored
@@ -328,6 +328,7 @@ func ParseDecimal128(s string) (Decimal128, error) {
|
||||
return dErr(s)
|
||||
}
|
||||
|
||||
// Parse the significand (i.e. the non-exponent part) as a big.Int.
|
||||
bi, ok := new(big.Int).SetString(intPart+decPart, 10)
|
||||
if !ok {
|
||||
return dErr(s)
|
||||
@@ -360,6 +361,19 @@ func ParseDecimal128FromBigInt(bi *big.Int, exp int) (Decimal128, bool) {
|
||||
q := new(big.Int)
|
||||
r := new(big.Int)
|
||||
|
||||
// If the significand is zero, the logical value will always be zero, independent of the
|
||||
// exponent. However, the loops for handling out-of-range exponent values below may be extremely
|
||||
// slow for zero values because the significand never changes. Limit the exponent value to the
|
||||
// supported range here to prevent entering the loops below.
|
||||
if bi.Cmp(zero) == 0 {
|
||||
if exp > MaxDecimal128Exp {
|
||||
exp = MaxDecimal128Exp
|
||||
}
|
||||
if exp < MinDecimal128Exp {
|
||||
exp = MinDecimal128Exp
|
||||
}
|
||||
}
|
||||
|
||||
for bigIntCmpAbs(bi, maxS) == 1 {
|
||||
bi, _ = q.QuoRem(bi, ten, r)
|
||||
if r.Cmp(zero) != 0 {
|
||||
|
Reference in New Issue
Block a user