ICU-10273 PluralRules FixedDecimal, avoid undefined cast from NaN to int64_t

X-SVN-Rev: 34287
This commit is contained in:
Andy Heninger 2013-09-12 20:07:53 +00:00
parent 5b0592af79
commit ed9d094e61

View file

@ -1388,11 +1388,15 @@ void FixedDecimal::init(double n, int32_t v, int64_t f) {
if (isNanOrInfinity) {
v = 0;
f = 0;
intValue = 0;
hasIntegerValue = FALSE;
} else {
intValue = (int64_t)source;
hasIntegerValue = (source == intValue);
}
visibleDecimalDigitCount = v;
decimalDigits = f;
intValue = (int64_t)source;
hasIntegerValue = (source == intValue);
if (f == 0) {
decimalDigitsWithoutTrailingZeros = 0;
} else {