Fix bug in json float parsing found by WASM IDE's static analyzer
This commit is contained in:
parent
c9aa17e119
commit
540a9aea0d
@ -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.")
|
||||
|
Loading…
Reference in New Issue
Block a user