diff options
| -rw-r--r-- | lua.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.77 2002/02/14 22:23:43 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.78 2002/02/15 15:15:10 roberto Exp roberto $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -243,6 +243,7 @@ static int lcall (lua_State *l, const char *name) { | |||
| 243 | 243 | ||
| 244 | static void manual_input (int version) { | 244 | static void manual_input (int version) { |
| 245 | if (version) print_version(); | 245 | if (version) print_version(); |
| 246 | lua_settop(L, 0); | ||
| 246 | lua_pushcfunction(L, trap_eof); /* set up handler for incomplete lines */ | 247 | lua_pushcfunction(L, trap_eof); /* set up handler for incomplete lines */ |
| 247 | while (load_string()) { | 248 | while (load_string()) { |
| 248 | ldo(lcall, NULL, 0); | 249 | ldo(lcall, NULL, 0); |
| @@ -255,7 +256,7 @@ static void manual_input (int version) { | |||
| 255 | lua_settop(L, 1); /* remove eventual results */ | 256 | lua_settop(L, 1); /* remove eventual results */ |
| 256 | } | 257 | } |
| 257 | printf("\n"); | 258 | printf("\n"); |
| 258 | lua_settop(L, 0); /* remove trap_eof */ | 259 | lua_pop(L, 1); /* remove trap_eof */ |
| 259 | } | 260 | } |
| 260 | 261 | ||
| 261 | 262 | ||
