summaryrefslogtreecommitdiff
path: root/deps/icu-small/source/i18n/numparse_parsednumber.cpp
diff options
context:
space:
mode:
authorUjjwal Sharma <usharma1998@gmail.com>2019-04-23 15:35:49 +0530
committerMichaƫl Zasso <targos@protonmail.com>2019-04-25 21:37:14 +0200
commitc9b298c5eed7abec0aff02d1f67e18e5ea938fc9 (patch)
treed523c26552e0c06e0c7e17434d2b68bed2b6e9e8 /deps/icu-small/source/i18n/numparse_parsednumber.cpp
parent6bbb9ebf8d8da927fc71f648af4739f2d574014f (diff)
downloadandroid-node-v8-c9b298c5eed7abec0aff02d1f67e18e5ea938fc9.tar.gz
android-node-v8-c9b298c5eed7abec0aff02d1f67e18e5ea938fc9.tar.bz2
android-node-v8-c9b298c5eed7abec0aff02d1f67e18e5ea938fc9.zip
deps: update ICU to 64.2
Update the version of the bundled ICU (deps/icu-small) to ICU version 64.2 (Unicode 12, CLDR 35) Fixes: https://github.com/nodejs/node/issues/26388 PR-URL: https://github.com/nodejs/node/pull/27361 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/icu-small/source/i18n/numparse_parsednumber.cpp')
-rw-r--r--deps/icu-small/source/i18n/numparse_parsednumber.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/deps/icu-small/source/i18n/numparse_parsednumber.cpp b/deps/icu-small/source/i18n/numparse_parsednumber.cpp
index 98da4e8319..3145f718dc 100644
--- a/deps/icu-small/source/i18n/numparse_parsednumber.cpp
+++ b/deps/icu-small/source/i18n/numparse_parsednumber.cpp
@@ -52,7 +52,7 @@ bool ParsedNumber::seenNumber() const {
return !quantity.bogus || 0 != (flags & FLAG_NAN) || 0 != (flags & FLAG_INFINITY);
}
-double ParsedNumber::getDouble() const {
+double ParsedNumber::getDouble(UErrorCode& status) const {
bool sawNaN = 0 != (flags & FLAG_NAN);
bool sawInfinity = 0 != (flags & FLAG_INFINITY);
@@ -69,7 +69,10 @@ double ParsedNumber::getDouble() const {
return INFINITY;
}
}
- U_ASSERT(!quantity.bogus);
+ if (quantity.bogus) {
+ status = U_INVALID_STATE_ERROR;
+ return 0.0;
+ }
if (quantity.isZero() && quantity.isNegative()) {
return -0.0;
}