aboutsummaryrefslogtreecommitdiff
path: root/ldblib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldblib.c')
-rw-r--r--ldblib.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ldblib.c b/ldblib.c
index 2e121aa9..af575bd7 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.84 2003/11/05 11:59:14 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.85 2004/04/30 20:13:38 roberto Exp roberto $
3** Interface from Lua to its debug API 3** Interface from Lua to its debug API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -261,7 +261,11 @@ static int debug (lua_State *L) {
261 if (fgets(buffer, sizeof(buffer), stdin) == 0 || 261 if (fgets(buffer, sizeof(buffer), stdin) == 0 ||
262 strcmp(buffer, "cont\n") == 0) 262 strcmp(buffer, "cont\n") == 0)
263 return 0; 263 return 0;
264 lua_dostring(L, buffer); 264 if (luaL_loadbuffer(L, buffer, strlen(buffer), "=debug command") ||
265 lua_pcall(L, 0, 0, 0)) {
266 fputs(lua_tostring(L, -1), stderr);
267 fputs("\n", stderr);
268 }
265 lua_settop(L, 0); /* remove eventual returns */ 269 lua_settop(L, 0); /* remove eventual returns */
266 } 270 }
267} 271}