1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:47:34 +00:00

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

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;
}