[Wasm] Fix invalid float and double sign parser for '-Infinity' value

This commit is contained in:
Igor Yakovlev
2023-03-29 19:46:37 +02:00
committed by Space Team
parent 44190937b0
commit 5a46cb1c40
2 changed files with 9 additions and 3 deletions
@@ -82,7 +82,7 @@ internal fun parseDouble(string: String): Double {
if (tryParseWord("Infinity")) {
parseUnsignificants()
if (index != string.length) numberFormatError(string)
return if (!isNegative) Double.POSITIVE_INFINITY else -Double.NEGATIVE_INFINITY
return if (!isNegative) Double.POSITIVE_INFINITY else Double.NEGATIVE_INFINITY
}
val numberBuilder = StringBuilder()