diff --git a/libpsx/src/libc.c b/libpsx/src/libc.c index 6e5c75d..7480825 100644 --- a/libpsx/src/libc.c +++ b/libpsx/src/libc.c @@ -177,6 +177,7 @@ static FILE *fopen_internal(const char *path, const char *mode, FILE *f) if(fd == -1) { + errno = ENOENT; if(s!=NULL)free(s); return NULL; }