mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix macro and rept buffer overflows
Macro and rept buffers were not always being terminated with newlines and/or were vulnerable to the final newline being escaped, allowing buffer overflows to occur. Now, they are terminated with newlines using the same mechanism as the file buffer.
This commit is contained in:
7
test/asm/line-continuation-macro.asm
Normal file
7
test/asm/line-continuation-macro.asm
Normal file
@@ -0,0 +1,7 @@
|
||||
m: MACRO
|
||||
ENDM
|
||||
|
||||
m2: MACRO
|
||||
m \ ENDM
|
||||
|
||||
m2
|
||||
0
test/asm/line-continuation-macro.out
Normal file
0
test/asm/line-continuation-macro.out
Normal file
8
test/asm/line-continuation-rept.asm
Normal file
8
test/asm/line-continuation-rept.asm
Normal file
@@ -0,0 +1,8 @@
|
||||
m: MACRO
|
||||
ENDM
|
||||
|
||||
REPT 1
|
||||
m ENDR
|
||||
|
||||
REPT 1
|
||||
m \ ENDR
|
||||
0
test/asm/line-continuation-rept.out
Normal file
0
test/asm/line-continuation-rept.out
Normal file
Reference in New Issue
Block a user