diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/generic/bigint.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx index 240494dfc15d..80b86af6013c 100644 --- a/tools/source/generic/bigint.cxx +++ b/tools/source/generic/bigint.cxx @@ -76,14 +76,15 @@ void BigInt::Normalize() { constexpr sal_uInt32 maxForPosInt32 = std::numeric_limits<sal_Int32>::max(); constexpr sal_uInt32 maxForNegInt32 = -sal_Int64(std::numeric_limits<sal_Int32>::min()); - if (bIsNeg && nNum[0] <= maxForNegInt32) + sal_uInt32 nNum0 = nNum[0]; + if (bIsNeg && nNum0 <= maxForNegInt32) { - nVal = -sal_Int64(nNum[0]); + nVal = -sal_Int64(nNum0); nLen = 0; } - else if (!bIsNeg && nNum[0] <= maxForPosInt32) + else if (!bIsNeg && nNum0 <= maxForPosInt32) { - nVal = nNum[0]; + nVal = nNum0; nLen = 0; } } |