aboutsummaryrefslogtreecommitdiff
path: root/src/lua_globs.c
diff options
context:
space:
mode:
authordacctal <donotcontactmevia@email.invalid>2026-07-07 06:31:14 +0000
committerdacctal <donotcontactmevia@email.invalid>2026-07-07 06:31:14 +0000
commit8fb080d0600d25f3f4937b450f74c0a7a242b3a4 (patch)
treed060fbb42c5efee3622aa4d52ccf51a9bfa3f7dd /src/lua_globs.c
parent23ac5cee1ab80c71058c6831e7275e08e10029b9 (diff)
doesn't work at all but checkpoint anyway!
Diffstat (limited to 'src/lua_globs.c')
-rw-r--r--src/lua_globs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lua_globs.c b/src/lua_globs.c
index 815a75e..ce5a59b 100644
--- a/src/lua_globs.c
+++ b/src/lua_globs.c
@@ -158,13 +158,14 @@ bool lua_try_function(lua_State *L, char *lua_file, char *fname) {
bool lua_try_table(lua_State *L, char *lua_file, char *tname) {
lua_getfield(L, -1, tname);
+ bool val = true;
if (!lua_istable(L, -1)) {
- if (strcmp(lua_file, "bldit.lua"))
+ val = false;
+ lua_pop(L, 1);
+ if (!strcmp(lua_file, "bldit.lua"))
bldit_isnt_type(tname, "table");
else
lua_isnt_type(tname, "table");
- return false;
}
- lua_pop(L, 1);
- return true;
+ return val;
}