Commit d97ee912 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix error return value of utf8_open

parent 49bca36d
......@@ -322,7 +322,7 @@ int utf8_open (const char *filename, int flags, mode_t mode)
if (!MultiByteToWideChar (CP_UTF8, 0, filename, -1, wpath, MAX_PATH))
{
errno = ENOENT;
return NULL;
return -1;
}
wpath[MAX_PATH] = L'\0';
......@@ -338,7 +338,7 @@ int utf8_open (const char *filename, int flags, mode_t mode)
if (local_name == NULL)
{
errno = ENOENT;
return NULL;
return -1;
}
int fd = open (local_name, flags, mode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment