- Fixed several memory errors

This commit is contained in:
2025-08-20 20:57:15 -04:00
parent 037c62bf12
commit fe4c49d092
20 changed files with 463 additions and 387 deletions

View File

@@ -29,7 +29,7 @@ static constexpr void insert_driver(list<platform::driver<CtorT>>& drvrs, CtorT
iter_t it = drvrs.begin();
while (it != drvrs.end()) {
if (priority > it->priority) {
if (priority >= it->priority) {
break;
}
}

View File

@@ -38,10 +38,10 @@ void unix_platform::unload_object(shared_object* obj) {
platform::symbol unix_platform::find_symbol(shared_object* obj, const cstring& name) {
string _name = name;
void* symbol = dlsym(obj, _name);
void* symbol = dlsym(obj, _name.cstr());
if (symbol == nullptr) {
_name = '_' + _name;
symbol = dlsym(obj, _name);
symbol = dlsym(obj, _name.cstr());
}
return symbol;
}