mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-27 12:10:47 +00:00
!5128 BugFix:Number.parseFloat("10000000000000000000000.0") Get an error result
Merge pull request !5128 from 贺存茂/hcm1102
This commit is contained in:
commit
91b2dae3ca
@ -664,6 +664,7 @@ double NumberHelper::StringToDouble(const uint8_t *start, const uint8_t *end, ui
|
||||
}
|
||||
|
||||
// 8. parse '.'
|
||||
exponent = 0;
|
||||
if (radix == DECIMAL && *p == '.') {
|
||||
RETURN_IF_CONVERSION_END(++p, end, (digits > 0 || (digits == 0 && leadingZero)) ?
|
||||
(number * std::pow(radix, exponent)) : NAN_VALUE);
|
||||
|
@ -109,4 +109,7 @@ print(s)
|
||||
print(Number.parseInt("4294967294"))
|
||||
print(Number.parseInt("2147483648"))
|
||||
|
||||
print(Number.parseFloat("10000000000000000000000.0"));
|
||||
|
||||
|
||||
print("builtins number end");
|
@ -99,6 +99,7 @@ TypeError: Cannot convert a BigInt value to a number
|
||||
0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034lmua2oev
|
||||
4294967294
|
||||
2147483648
|
||||
1e+22
|
||||
builtins number end
|
||||
builtins regexp start
|
||||
20210608_5V0J5lVh4xVNYx0AUE.jpg,.jpg
|
||||
|
Loading…
Reference in New Issue
Block a user