X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/52f80d6ec77e44660f353e19c71e7994df59496d..3b51da05ef42ecf59b78a6c29664d3e555bc57da:/projects/stargazer/store_loader.cpp?ds=sidebyside diff --git a/projects/stargazer/store_loader.cpp b/projects/stargazer/store_loader.cpp index c54bdb36..1529a2cc 100644 --- a/projects/stargazer/store_loader.cpp +++ b/projects/stargazer/store_loader.cpp @@ -79,7 +79,7 @@ if (!handle) isLoaded = true; STORE * (*GetStore)(); -GetStore = (STORE * (*)())dlsym(handle, "GetStore"); +GetStore = reinterpret_cast(dlsym(handle, "GetStore")); if (!GetStore) { errorStr = std::string("GetStore() not found! ") + dlerror(); @@ -115,6 +115,8 @@ if (!isLoaded) return true; } +delete plugin; + if (dlclose(handle)) { errorStr = "Failed to unload plugin '";