diff --git a/Makefile b/Makefile index 1de7fbc..4226aa3 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,11 @@ -CC=clang +CC ?= clang +CFLAGS ?= all: - $(CC) -o lbr -O2 -Wall -Wextra -Wpedantic src/*.c + $(CC) -o lbr -O2 -Wall -Wextra -Wpedantic $(CFLAGS) src/*.c + +clean: + rm lbr test: - ./lbr tests/test.lb \ No newline at end of file + ./lbr tests/test.lb diff --git a/src/execute.c b/src/execute.c index 8b0b84d..d86a16d 100644 --- a/src/execute.c +++ b/src/execute.c @@ -532,11 +532,7 @@ void execute(Stack *stack, Stack *originstack, char *modname) if (!strcmp(NAME, "size")) { - int i = 0; - while (i < stack->pointer) - i++; - - stack_push(stack, i); + stack_push(stack, stack->pointer); continue; }