Skip to content

Commit 2fc33e6

Browse files
authored
Fuzzer: Handle negative i31s (#6341)
1 parent e3450ca commit 2fc33e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/fuzz_opt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def fix_double(x):
584584

585585
# JS prints i31 as just a number, so change "i31ref(N)" (which C++ emits)
586586
# to "N".
587-
out = re.sub(r'i31ref\((\d+)\)', r'\1', out)
587+
out = re.sub(r'i31ref\((-?\d+)\)', r'\1', out)
588588

589589
lines = out.splitlines()
590590
for i in range(len(lines)):

0 commit comments

Comments
 (0)