Fix segfault

This commit is contained in:
savalet
2024-04-22 15:19:36 +02:00
parent 7e702cd5a3
commit 9f528d3ce2
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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;