mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-06 12:15:39 +00:00
Report error when shifting outside a macro
This commit is contained in:
4 files changed
+7
-1
No files matched your search
+3
-1
@@ -130,7 +130,9 @@ uint32_t macro_UseNewUniqueID(void)
|
||||
|
||||
void macro_ShiftCurrentArgs(void)
|
||||
{
|
||||
if (macroArgs->shift != macroArgs->nbArgs)
|
||||
if (!macroArgs)
|
||||
error("Cannot shift macro arguments outside of a macro\n");
|
||||
else if (macroArgs->shift != macroArgs->nbArgs)
|
||||
macroArgs->shift++;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user