Merge pull request #213 from wryun/fix-cat

Fix cat command
This commit is contained in:
joeycastillo 2023-03-11 16:33:13 -05:00 committed by GitHub
commit 7793333ed3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {