Fix segfault with invalid RGBLINK scramble spec (#1730)

This commit is contained in:
Rangi
2025-07-08 12:34:54 -04:00
committed by GitHub
parent 1a77667409
commit 991b74dd0d
4 changed files with 21 additions and 6 deletions

View File

@@ -0,0 +1,2 @@
SECTION "test", ROM0
db 1, 2, 3

View File

@@ -0,0 +1,2 @@
error: Invalid argument for option 'S': Unexpected ':' after region name "romx"
Linking failed with 1 error

View File

@@ -252,6 +252,14 @@ rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2" 2>"$outtemp"
tryDiff "$test"/out.err "$outtemp"
evaluateTest
test="scramble-invalid"
startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
continueTest
rgblinkQuiet -o "$gbtemp" -S "romx := 4" "$otemp" 2>"$outtemp"
tryDiff "$test"/out.err "$outtemp"
evaluateTest
test="scramble-romx"
startTest
"$RGBASM" -o "$otemp" "$test"/a.asm