diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 171a246d255..6705d79526c 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -584,7 +584,7 @@ def fix_double(x): # JS prints i31 as just a number, so change "i31ref(N)" (which C++ emits) # to "N". - out = re.sub(r'i31ref\((\d+)\)', r'\1', out) + out = re.sub(r'i31ref\((-?\d+)\)', r'\1', out) lines = out.splitlines() for i in range(len(lines)):