mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Fix "REPT 0" not being a no-op
This commit is contained in:
@@ -258,6 +258,8 @@ void fstk_RunRept(uint32_t count, int32_t nReptLineNo, char *body, size_t size)
|
|||||||
{
|
{
|
||||||
dbgPrint("Running REPT(%" PRIu32 ")\n", count);
|
dbgPrint("Running REPT(%" PRIu32 ")\n", count);
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
return;
|
||||||
uint32_t reptDepth = contextStack->reptDepth;
|
uint32_t reptDepth = contextStack->reptDepth;
|
||||||
|
|
||||||
newContext(reptDepth + 1);
|
newContext(reptDepth + 1);
|
||||||
|
|||||||
3
test/asm/rept-0.asm
Normal file
3
test/asm/rept-0.asm
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
REPT 0
|
||||||
|
WARN "2"
|
||||||
|
ENDR
|
||||||
0
test/asm/rept-0.err
Normal file
0
test/asm/rept-0.err
Normal file
0
test/asm/rept-0.out
Normal file
0
test/asm/rept-0.out
Normal file
Reference in New Issue
Block a user