aboutsummaryrefslogtreecommitdiff
path: root/tests/testmod.c
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2018-01-13 19:57:19 +0100
committerPhilipp Janda <siffiejoe@gmx.net>2018-01-13 19:57:19 +0100
commit340f2f4777e8ad427a364c9c1ef562d40c60cb1d (patch)
tree1be2cc11bf9d2d59e5973faa466563a649bdc5e4 /tests/testmod.c
parent30077d241b788b644fb923b4c2da628cdd2c3423 (diff)
downloadlua-compat-5.3-340f2f4777e8ad427a364c9c1ef562d40c60cb1d.tar.gz
lua-compat-5.3-340f2f4777e8ad427a364c9c1ef562d40c60cb1d.tar.bz2
lua-compat-5.3-340f2f4777e8ad427a364c9c1ef562d40c60cb1d.zip
lua_tointeger(x) rejects non-ints for Lua 5.1.
Diffstat (limited to 'tests/testmod.c')
-rw-r--r--tests/testmod.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/testmod.c b/tests/testmod.c
index 9232682..cd56e76 100644
--- a/tests/testmod.c
+++ b/tests/testmod.c
@@ -152,7 +152,8 @@ static int test_tointeger (lua_State *L) {
152 lua_pushnil(L); 152 lua_pushnil(L);
153 else 153 else
154 lua_pushinteger(L, n); 154 lua_pushinteger(L, n);
155 return 1; 155 lua_pushinteger(L, lua_tointeger(L, 1));
156 return 2;
156} 157}
157 158
158static int test_len (lua_State *L) { 159static int test_len (lua_State *L) {