mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Report error when shifting outside a macro
This commit is contained in:
@@ -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