diff options
| author | Alexey Melnichuk <alexeymelnichuck@gmail.com> | 2016-09-05 16:27:39 +0300 |
|---|---|---|
| committer | Alexey Melnichuk <alexeymelnichuck@gmail.com> | 2016-09-05 16:27:39 +0300 |
| commit | 0e4d2aab4c13e07f79a03d3870b5af2ba79a0662 (patch) | |
| tree | 27c056ad25b232bbd8590012fcc63666d85f4307 | |
| parent | 0f961dd2ace7027ad238a193f301b8fa7dc12d56 (diff) | |
| download | lua-llthreads2-0e4d2aab4c13e07f79a03d3870b5af2ba79a0662.tar.gz lua-llthreads2-0e4d2aab4c13e07f79a03d3870b5af2ba79a0662.tar.bz2 lua-llthreads2-0e4d2aab4c13e07f79a03d3870b5af2ba79a0662.zip | |
Fix. Pass integer argument to thread.
| -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: |
