diff options
-rw-r--r-- | src/copy.inc | 5 |
1 files changed, 5 insertions, 0 deletions
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) { | |||
77 | lua_pushnil(state->to_L); | 77 | lua_pushnil(state->to_L); |
78 | break; | 78 | break; |
79 | case LUA_TNUMBER: | 79 | case LUA_TNUMBER: |
80 | #if LUA_VERSION_NUM >= 503 | ||
81 | if(lua_isinteger(state->from_L, idx)) | ||
82 | lua_pushinteger(state->to_L, lua_tointeger(state->from_L, idx)); | ||
83 | else | ||
84 | #endif | ||
80 | lua_pushnumber(state->to_L, lua_tonumber(state->from_L, idx)); | 85 | lua_pushnumber(state->to_L, lua_tonumber(state->from_L, idx)); |
81 | break; | 86 | break; |
82 | case LUA_TBOOLEAN: | 87 | case LUA_TBOOLEAN: |