Fix "REPT 0" not being a no-op

This commit is contained in:
ISSOtm
2020-08-18 12:34:05 +02:00
parent f9b48c0cad
commit b7b03ee451
4 changed files with 5 additions and 0 deletions

View File

@@ -258,6 +258,8 @@ void fstk_RunRept(uint32_t count, int32_t nReptLineNo, char *body, size_t size)
{
dbgPrint("Running REPT(%" PRIu32 ")\n", count);
if (count == 0)
return;
uint32_t reptDepth = contextStack->reptDepth;
newContext(reptDepth + 1);

3
test/asm/rept-0.asm Normal file
View File

@@ -0,0 +1,3 @@
REPT 0
WARN "2"
ENDR

0
test/asm/rept-0.err Normal file
View File

0
test/asm/rept-0.out Normal file
View File