mirror of
https://github.com/ZDoom/acc.git
synced 2025-03-14 04:10:41 +00:00
- respect compacting when limit number of functions
https://forum.zdoom.org/viewtopic.php?t=69374
This commit is contained in:
parent
aa55fea3e1
commit
d60c4901f4
1 changed files with 3 additions and 1 deletions
4
pcode.c
4
pcode.c
|
@ -10,6 +10,7 @@
|
|||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include "pcode.h"
|
||||
#include "common.h"
|
||||
#include "error.h"
|
||||
|
@ -1520,8 +1521,9 @@ void PC_SetScriptVarCount(int number, int type, int varCount, int arrayCount, in
|
|||
void PC_AddFunction(symbolNode_t *sym, int arrayCount, int *arraySizes)
|
||||
{
|
||||
functionInfo_t *function;
|
||||
int maxFunctionCount = pc_NoShrink ? MAX_FUNCTION_COUNT : (1 << CHAR_BIT * sizeof(U_BYTE));
|
||||
|
||||
if(pc_FunctionCount == MAX_FUNCTION_COUNT)
|
||||
if(pc_FunctionCount == maxFunctionCount)
|
||||
{
|
||||
ERR_Error(ERR_TOO_MANY_FUNCTIONS, YES, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue