aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-04-24 18:38:22 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-04-24 18:38:22 +0300
commit1da880d277614f02eb80df4dc570da7b70787801 (patch)
treeb840946a16eaf17a214bb8ab1fbcbad8b1ae0cc6 /map.c
parent5b2d190819d043639be4b747c660f549f03987d7 (diff)
downloadastar-1da880d277614f02eb80df4dc570da7b70787801.tar.xz
Do fclose() where we do fopen()
Diffstat (limited to 'map.c')
-rw-r--r--map.c8
1 files changed, 8 insertions, 0 deletions
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;
}