CeDOS - Commit 2ea84139

cat: Corrected fopen check
Celina Sophie Kalus
Wed, 06 Dec 2023 23:22:04 +0100
1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M shell/cat.cshell/cat.c

@@ -8,7 +8,7 @@

void main(char *args) { FILE* file = fopen(args, "r"); - if (file == NULL) { + if (file == -1) { printf("Could not find file: %s\n", args); return; }