aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-11-14 16:15:17 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-11-14 16:15:17 -0200
commit5bdfefd3a59169ef61af86c0774e9ca93d97d3d9 (patch)
tree35b4e0975d0ab9e7dcc75edc7c10df28647d0696
parent5873786e276d4c6f2b5c27880a676cb53059df57 (diff)
downloadlua-5bdfefd3a59169ef61af86c0774e9ca93d97d3d9.tar.gz
lua-5bdfefd3a59169ef61af86c0774e9ca93d97d3d9.tar.bz2
lua-5bdfefd3a59169ef61af86c0774e9ca93d97d3d9.zip
allows calling luaL_checkstack with no message (in runC)
-rw-r--r--ltests.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ltests.c b/ltests.c
index e99cb8e5..d0bee007 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.195 2014/11/10 17:41:36 roberto Exp roberto $ 2** $Id: ltests.c,v 2.196 2014/11/11 17:15:06 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*/
@@ -1096,7 +1096,10 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) {
1096 } 1096 }
1097 else if EQ("checkstack") { 1097 else if EQ("checkstack") {
1098 int sz = getnum; 1098 int sz = getnum;
1099 luaL_checkstack(L1, sz, getstring); 1099 const char *msg = getstring;
1100 if (*msg == '\0')
1101 msg = NULL; /* to test 'luaL_checkstack' with no message */
1102 luaL_checkstack(L1, sz, msg);
1100 } 1103 }
1101 else if EQ("compare") { 1104 else if EQ("compare") {
1102 int a = getindex; 1105 int a = getindex;