Fix bug in json float parsing found by WASM IDE's static analyzer

This commit is contained in:
K. Lange 2021-03-10 14:35:03 +09:00
parent c9aa17e119
commit 540a9aea0d

View File

@ -113,8 +113,8 @@ def loads(s):
if peek() not in '0123456789':
raise ValueError("Expected digit")
while peek() in '0123456789':
value = value + multiplier * int(peek())
multiplier = multiplier * 0.1
value = value + mult * int(peek())
mult = mult * 0.1
advance()
if peek() in 'eE':
raise NotImplementedError("Exponent values are not implemented.")