From 340f2f4777e8ad427a364c9c1ef562d40c60cb1d Mon Sep 17 00:00:00 2001 From: Philipp Janda Date: Sat, 13 Jan 2018 19:57:19 +0100 Subject: lua_tointeger(x) rejects non-ints for Lua 5.1. --- tests/testmod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/testmod.c') 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) { lua_pushnil(L); else lua_pushinteger(L, n); - return 1; + lua_pushinteger(L, lua_tointeger(L, 1)); + return 2; } static int test_len (lua_State *L) { -- cgit v1.2.3-55-g6feb