mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-11 08:01:32 +00:00
ICU-10273 PluralRules FixedDecimal, avoid undefined cast from NaN to int64_t
X-SVN-Rev: 34287
This commit is contained in:
parent
5b0592af79
commit
ed9d094e61
1 changed files with 6 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue