From 093ae837ee184350e67bd4ae10a999e7f846a8ff Mon Sep 17 00:00:00 2001 From: takase1121 <20792268+takase1121@users.noreply.github.com> Date: Wed, 15 Jun 2022 16:04:37 +0800 Subject: [PATCH 1/2] add .cache to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 75dec714..5ef4e966 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ lhelper/ submodules/ subprojects/*/ /appimage* +.cache .ccls-cache .lite-debug.log .run* From 0de90d542b20b908c14f024d6c7da12d4f84028a Mon Sep 17 00:00:00 2001 From: takase1121 <20792268+takase1121@users.noreply.github.com> Date: Wed, 15 Jun 2022 16:05:20 +0800 Subject: [PATCH 2/2] omit filename from error message --- src/api/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/system.c b/src/api/system.c index ff99ce6f..584dd7de 100644 --- a/src/api/system.c +++ b/src/api/system.c @@ -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");