LibC: Fix bad error check after open() in dlopen()

This commit is contained in:
Andreas Kling 2021-01-31 10:03:46 +01:00
parent be5311be99
commit d71bfb9614
Notes: sideshowbarker 2024-07-18 22:42:14 +09:00

View file

@ -78,7 +78,7 @@ void* dlopen(const char* filename, int flags)
}
int fd = open(filename, O_RDONLY);
if (!fd) {
if (fd < 0) {
g_dlerror_msg = String::formatted("Unable to open file {}", filename);
return nullptr;
}