mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Previously, a PUSHS before a SECTION directive would cause rgbasm to crash when encountering a subsequent POPS. This is because the subsequently-called out_setCurrentSection() expected the new section to be non-null, which wasn’t the case in this situation. This has been addressed by allowing the ‘null’ section to be set in this function, and only dereferencing it (to set nPC) if a non-null section is to be set. In practice, this means that PUSHS/POPS can now be used to push/restore a context without a section.
11 lines
103 B
NASM
11 lines
103 B
NASM
PUSHS
|
|
|
|
SECTION "Test", ROM0
|
|
SomeContent:
|
|
db 1, 2, 3, 4, 5, 6, 7, 8, 9
|
|
|
|
POPS
|
|
|
|
DisallowedContent:
|
|
db 0
|