diff options
| -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; } |
