diff --git a/include/asm/asm.h b/include/asm/asm.h index 36ba06f5..69a1954f 100644 --- a/include/asm/asm.h +++ b/include/asm/asm.h @@ -22,7 +22,7 @@ #include "asm/symbol.h" #define MAXUNIONS 128 -#define MAXMACROARGS 256 +#define MAXMACROARGS 99999 #define MAXINCPATHS 128 extern int32_t nLineNo; diff --git a/src/asm/macro.c b/src/asm/macro.c index 00cc139c..bec91982 100644 --- a/src/asm/macro.c +++ b/src/asm/macro.c @@ -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; }