ICU-97 Fixed the case where fCount accidentally becomes negative.
X-SVN-Rev: 3475
This commit is contained in:
parent
c47b7bb2bd
commit
0e5e9a816c
@ -219,7 +219,7 @@ DigitList::fitsIntoLong(UBool ignoreNegativeZero)
|
||||
|
||||
// Trim trailing zeros after the decimal point. This does not change
|
||||
// the represented value.
|
||||
while (fCount > fDecimalAt && fDigits[fCount - 1] == '0')
|
||||
while (fCount > fDecimalAt && fCount > 0 && fDigits[fCount - 1] == '0')
|
||||
--fCount;
|
||||
|
||||
if (fCount == 0) {
|
||||
|
@ -219,7 +219,7 @@ DigitList::fitsIntoLong(UBool ignoreNegativeZero)
|
||||
|
||||
// Trim trailing zeros after the decimal point. This does not change
|
||||
// the represented value.
|
||||
while (fCount > fDecimalAt && fDigits[fCount - 1] == '0')
|
||||
while (fCount > fDecimalAt && fCount > 0 && fDigits[fCount - 1] == '0')
|
||||
--fCount;
|
||||
|
||||
if (fCount == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user