Merge pull request #1037 from takase1121/PR/dlopen-omit-filename

omit filename when printing error for library load
This commit is contained in:
Jefferson González 2022-06-15 16:37:41 -04:00 committed by GitHub
commit bde056350a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@ lhelper/
submodules/
subprojects/*/
/appimage*
.cache
.ccls-cache
.lite-debug.log
.run*

View File

@ -769,7 +769,7 @@ static int f_load_native_plugin(lua_State *L) {
const char *path = luaL_checkstring(L, 2);
void *library = SDL_LoadObject(path);
if (!library)
return luaL_error(L, "Unable to load %s: %s", name, SDL_GetError());
return (lua_pushstring(L, SDL_GetError()), lua_error(L));
lua_getglobal(L, "package");
lua_getfield(L, -1, "native_plugins");