aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ltests.c b/ltests.c
index bd8469f3..b4d81ada 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.116 2002/04/05 18:54:31 roberto Exp roberto $ 2** $Id: ltests.c,v 1.117 2002/04/24 20:07:46 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -383,7 +383,11 @@ static int udataval (lua_State *L) {
383 383
384static int doonnewstack (lua_State *L) { 384static int doonnewstack (lua_State *L) {
385 lua_State *L1 = lua_newthread(L); 385 lua_State *L1 = lua_newthread(L);
386 int status = lua_dostring(L1, luaL_check_string(L, 1)); 386 size_t l;
387 const char *s = luaL_check_lstr(L, 1, &l);
388 int status = lua_loadbuffer(L1, s, l, s);
389 if (status == 0)
390 status = lua_pcall(L1, 0, 0, 0);
387 lua_pushnumber(L, status); 391 lua_pushnumber(L, status);
388 lua_closethread(L, L1); 392 lua_closethread(L, L1);
389 return 1; 393 return 1;