From 0e4d2aab4c13e07f79a03d3870b5af2ba79a0662 Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Mon, 5 Sep 2016 16:27:39 +0300 Subject: Fix. Pass integer argument to thread. --- src/copy.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/copy.inc b/src/copy.inc index 21ba261..d9f7e86 100644 --- a/src/copy.inc +++ b/src/copy.inc @@ -77,6 +77,11 @@ static int llthread_copy_value(llthread_copy_state *state, int depth, int idx) { lua_pushnil(state->to_L); break; case LUA_TNUMBER: +#if LUA_VERSION_NUM >= 503 + if(lua_isinteger(state->from_L, idx)) + lua_pushinteger(state->to_L, lua_tointeger(state->from_L, idx)); + else +#endif lua_pushnumber(state->to_L, lua_tonumber(state->from_L, idx)); break; case LUA_TBOOLEAN: -- cgit v1.2.3-55-g6feb