Skip to content

Commit

Permalink
Fix. Pass integer argument to thread.
Browse files Browse the repository at this point in the history
  • Loading branch information
moteus committed Sep 5, 2016
1 parent 0f961dd commit 0e4d2aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/copy.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0e4d2aa

Please sign in to comment.