omit filename from error message

This commit is contained in:
takase1121 2022-06-15 16:05:20 +08:00
parent 093ae837ee
commit 0de90d542b
No known key found for this signature in database
GPG Key ID: 60EEFFC68EB3031B
1 changed files with 1 additions and 1 deletions

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");