From c9b298c5eed7abec0aff02d1f67e18e5ea938fc9 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Tue, 23 Apr 2019 15:35:49 +0530 Subject: 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 Reviewed-By: Steven R Loomis Reviewed-By: Michael Dawson --- deps/icu-small/source/i18n/numparse_parsednumber.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'deps/icu-small/source/i18n/numparse_parsednumber.cpp') 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; } -- cgit v1.2.3