diff options
author | James R. McKaskill <james@foobar.co.nz> | 2012-06-04 05:27:18 +0400 |
---|---|---|
committer | James R. McKaskill <james@foobar.co.nz> | 2012-06-04 05:28:28 +0400 |
commit | 3d258f087d26105eaee8bb6fd95bf0a23b1162f5 (patch) | |
tree | bbbe81fcdeaa460c7afe5a7c17b22f14f355b57e /ffi.c | |
parent | 0bc6f30a0c9c78cfa8fa42e96d437dfbccdcfaeb (diff) |
ffi_number should call tonumber with all args and rets
Fixes #40
Diffstat (limited to 'ffi.c')
-rw-r--r-- | ffi.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2301,9 +2301,9 @@ static int ffi_number(lua_State* L) /* call the old _G.tonumber, we use an upvalue as _G.tonumber is set * to this function */ lua_pushvalue(L, lua_upvalueindex(1)); - lua_pushvalue(L, 1); - lua_call(L, 1, LUA_MULTRET); - return 1; + lua_insert(L, 1); + lua_call(L, lua_gettop(L)-1, LUA_MULTRET); + return lua_gettop(L); } } |