summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--movement/filesystem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/movement/filesystem.c b/movement/filesystem.c
index 2b345eda..97e35455 100644
--- a/movement/filesystem.c
+++ b/movement/filesystem.c
@@ -196,6 +196,7 @@ static void filesystem_cat(char *filename) {
if (info.size > 0) {
char *buf = malloc(info.size + 1);
filesystem_read_file(filename, buf, info.size);
+ buf[info.size] = '\0';
printf("%s\n", buf);
free(buf);
} else {