diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-24 18:38:22 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-24 18:38:22 +0300 |
| commit | 1da880d277614f02eb80df4dc570da7b70787801 (patch) | |
| tree | b840946a16eaf17a214bb8ab1fbcbad8b1ae0cc6 /map.c | |
| parent | 5b2d190819d043639be4b747c660f549f03987d7 (diff) | |
| download | astar-1da880d277614f02eb80df4dc570da7b70787801.tar.xz | |
Do fclose() where we do fopen()
Diffstat (limited to 'map.c')
| -rw-r--r-- | map.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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; } |
