From 1da880d277614f02eb80df4dc570da7b70787801 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Fri, 24 Apr 2026 18:38:22 +0300 Subject: Do fclose() where we do fopen() --- map.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'map.c') diff --git a/map.c b/map.c index 73e061b..2abaf68 100644 --- a/map.c +++ b/map.c @@ -359,6 +359,8 @@ Map file_plaintext_map(char *filename, size_t *width, size_t *height, Position * fgetc(file); } + fclose(file); + return map; } @@ -390,6 +392,9 @@ size_t **file_plaintext_costs(char *filename, size_t width, size_t height) { set_message("Loaded costs from %s", filename); print_message(height); + + fclose(file); + return costs; } @@ -417,6 +422,9 @@ void map_to_file_plaintext(char *filename, Map map, size_t width, size_t height, set_message("Saved the map to %s", filename); print_message(height); + + fclose(file); + return; } -- cgit v1.2.3