diff --git a/src/lceasy.c b/src/lceasy.c index 5e287ff..341b892 100644 --- a/src/lceasy.c +++ b/src/lceasy.c @@ -560,10 +560,10 @@ static int lcurl_xferinfo_callback(void *arg, curl_off_t dltotal, curl_off_t dln int top = lua_gettop(L); int n = lcurl_util_push_cb(L, &p->pr); - lua_pushnumber( L, dltotal ); - lua_pushnumber( L, dlnow ); - lua_pushnumber( L, ultotal ); - lua_pushnumber( L, ulnow ); + lua_pushnumber( L, (lua_Number)dltotal ); + lua_pushnumber( L, (lua_Number)dlnow ); + lua_pushnumber( L, (lua_Number)ultotal ); + lua_pushnumber( L, (lua_Number)ulnow ); if(lua_pcall(L, n+3, LUA_MULTRET, 0)){ assert(lua_gettop(L) >= top); diff --git a/src/lcmulti.c b/src/lcmulti.c index a92400c..d46e72d 100644 --- a/src/lcmulti.c +++ b/src/lcmulti.c @@ -358,7 +358,7 @@ int lcurl_multi_timer_callback(CURLM *multi, long ms, void *arg){ if(lua_isboolean(L, top + 1)) ret = lua_toboolean(L, top + 1)?0:-1; - else ret = lua_tonumber(L, top + 1); + else ret = lua_tointeger(L, top + 1); } lua_settop(L, top);