summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpsx/src/libc.c1
1 files changed, 1 insertions, 0 deletions
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;
}