mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Set max macro arguments to 99,999
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
#include "asm/symbol.h"
|
||||
|
||||
#define MAXUNIONS 128
|
||||
#define MAXMACROARGS 256
|
||||
#define MAXMACROARGS 99999
|
||||
#define MAXINCPATHS 128
|
||||
|
||||
extern int32_t nLineNo;
|
||||
|
||||
@@ -44,7 +44,8 @@ void macro_AppendArg(struct MacroArgs **args, char *s)
|
||||
if ((**args).nbArgs == MAXMACROARGS)
|
||||
yyerror("A maximum of " EXPAND_AND_STR(MAXMACROARGS)
|
||||
" arguments is allowed");
|
||||
*args = realloc(*args, sizeof **args + sizeof (char *) * (1 + (**args).nbArgs));
|
||||
*args = realloc(*args, sizeof(**args) +
|
||||
sizeof(char *) * (1 + (**args).nbArgs));
|
||||
(**args).args[(**args).nbArgs++] = s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user