diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-05 22:28:08 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-05 22:39:36 -0700 |
commit | 6fc0e72cb3adda2151dbb643579b5c53bc940413 (patch) | |
tree | 290796afd561c0d524b9783dfeb10d4b67b6172e /src/lua.c | |
parent | 6b8da095b1e14d0dad17e78513217abb4cfed8bf (diff) | |
download | teliva-6fc0e72cb3adda2151dbb643579b5c53bc940413.tar.gz |
utterly ghastly way to rerun script after edit
Diffstat (limited to 'src/lua.c')
-rw-r--r-- | src/lua.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |