aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}