mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
LibC: Fix bad error check after open() in dlopen()
This commit is contained in:
parent
be5311be99
commit
d71bfb9614
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ void* dlopen(const char* filename, int flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
int fd = open(filename, O_RDONLY);
|
int fd = open(filename, O_RDONLY);
|
||||||
if (!fd) {
|
if (fd < 0) {
|
||||||
g_dlerror_msg = String::formatted("Unable to open file {}", filename);
|
g_dlerror_msg = String::formatted("Unable to open file {}", filename);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue