diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-11-14 16:15:17 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-11-14 16:15:17 -0200 |
commit | 5bdfefd3a59169ef61af86c0774e9ca93d97d3d9 (patch) | |
tree | 35b4e0975d0ab9e7dcc75edc7c10df28647d0696 | |
parent | 5873786e276d4c6f2b5c27880a676cb53059df57 (diff) | |
download | lua-5bdfefd3a59169ef61af86c0774e9ca93d97d3d9.tar.gz lua-5bdfefd3a59169ef61af86c0774e9ca93d97d3d9.tar.bz2 lua-5bdfefd3a59169ef61af86c0774e9ca93d97d3d9.zip |
allows calling luaL_checkstack with no message (in runC)
-rw-r--r-- | ltests.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; |