mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Merge pull request #600 from NieDzejkob/stray-shift
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