aboutsummaryrefslogtreecommitdiff
path: root/vis-lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis-lua.c')
-rw-r--r--vis-lua.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vis-lua.c b/vis-lua.c
index 7318ec3..42196d1 100644
--- a/vis-lua.c
+++ b/vis-lua.c
@@ -2049,7 +2049,7 @@ bool vis_lua_file_save_pre(Vis *vis, File *file, const char *path) {
lua_pushstring(L, path);
if (pcall(vis, L, 2, 1) != 0)
return false;
- return lua_toboolean(L, -1);
+ return !lua_isboolean(L, -1) || lua_toboolean(L, -1);
}
lua_pop(L, 1);
return true;