From 6fc0e72cb3adda2151dbb643579b5c53bc940413 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 5 Nov 2021 22:28:08 -0700 Subject: utterly ghastly way to rerun script after edit --- src/lua.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lua.c') diff --git a/src/lua.c b/src/lua.c index 0b6dcb3..7142641 100644 --- a/src/lua.c +++ b/src/lua.c @@ -245,7 +245,7 @@ static int handle_script (lua_State *L, char **argv, int n) { if (status == 0) status = docall(L, narg, 0); else - lua_pop(L, narg); + lua_pop(L, narg); return report(L, status); } @@ -369,6 +369,7 @@ static int pmain (lua_State *L) { void draw_menu(void); +char **Argv = NULL; int main (int argc, char **argv) { @@ -385,6 +386,7 @@ int main (int argc, char **argv) { echo(); s.argc = argc; s.argv = argv; + Argv = argv; status = lua_cpcall(L, &pmain, &s); report(L, status); lua_close(L); -- cgit 1.4.1-2-gfad0