From cb4abc221844aa22f11447914d6d5dedd71a054c Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Fri, 17 Feb 2023 12:43:55 -0800 Subject: changed makefile, limited arg count to 100 --- Makefile | 4 ++-- src/eval.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9390a29..880f396 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CFLAGS=-I. -pthread -Wall -Wextra -Wpedantic -O3 -lm -CFLAGS+= -Wshadow -Wstrict-prototypes -Wundef -Wpointer-arith -Wcast-align -Wstrict-overflow=5 -Wswitch-default -CFLAGS+= -Wunreachable-code -Wswitch-enum -Wformat=2 -Wc11-extensions -g +CFLAGS+= -Wshadow -Wstrict-prototypes -Wundef -Wpointer-arith -Wcast-align +CFLAGS+= -Wunreachable-code -Wswitch-enum -Wformat=2 -g PREFIX ?= /usr BINDIR ?= ${PREFIX}/bin diff --git a/src/eval.c b/src/eval.c index f34a0f1..45cdde4 100644 --- a/src/eval.c +++ b/src/eval.c @@ -32,7 +32,7 @@ sym_t* eval(sym_t* symbol, hashtable_t* parentScope) { if (p.key != NULL) { sym_t* nextSym = (sym_t*)p.value; /* add params */ - for (int i = 0; i < symbol->argCount; i++) { + for (int i = 0; i < symbol->argCount && i < 100; i++) { char* keyName = malloc(6 * sizeof(char)); strcpy(keyName, "arg"); char index[3]; -- cgit v1.3.1