Merge pull request #600 from NieDzejkob/stray-shift

Report error when shifting outside a macro
This commit is contained in:
Eldred Habert authored and GitHub committed 2020-10-12 01:44:10 +02:00
commit 176a57a1e9
4 files changed
+7 -1

No files matched your search

+3 -1
View File
@@ -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++;
}
+1
View File
@@ -0,0 +1 @@
shift
+3
View File
@@ -0,0 +1,3 @@
ERROR: shift-outside-macro.asm(1):
Cannot shift macro arguments outside of a macro
error: Assembly aborted (1 errors)!
View File
Whitespace-only changes.