mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Fix crash when no macro args are being used
This commit is contained in:
@@ -89,6 +89,9 @@ void macro_FreeArgs(struct MacroArgs *args)
|
||||
|
||||
char const *macro_GetArg(uint32_t i)
|
||||
{
|
||||
if (!macroArgs)
|
||||
return NULL;
|
||||
|
||||
uint32_t realIndex = i + macroArgs->shift - 1;
|
||||
|
||||
return realIndex >= macroArgs->nbArgs ? NULL
|
||||
|
||||
Reference in New Issue
Block a user