diff --git a/Makefile b/Makefile index 280d679..2154733 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ LIB_OBJS = $(LIB_SRCS:.c=.o) CC = gcc -CFLAGS = -lasan -Iinclude +CFLAGS = -Iinclude LDFLAGS = -L$(LIB_DIR) -lmy -lcsfml-graphics -lcsfml-window -lcsfml-system -lm diff --git a/src/script.c b/src/script.c index 9d7aecb..6e77733 100644 --- a/src/script.c +++ b/src/script.c @@ -30,7 +30,7 @@ void handle_event(sfEvent event, csfml **csfml, int *should_close) return; } if (event.type == sfEvtClosed) { - *should_close = 1; + exit(0); } if (event.type == sfEvtKeyPressed && event.key.code == sfKeyL) show_hitboxes = !show_hitboxes;