mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-13 04:36:16 +00:00
fix(lua): Treat VALUE always as integer
rtorrent doesn't have floating point data type
This commit is contained in:
+1
-1
@@ -225,7 +225,7 @@ object_to_lua(lua_State* l_state, torrent::Object const& object) {
|
|||||||
// Converts an object to a single Lua stack object
|
// Converts an object to a single Lua stack object
|
||||||
switch (object.type()) {
|
switch (object.type()) {
|
||||||
case torrent::Object::TYPE_VALUE:
|
case torrent::Object::TYPE_VALUE:
|
||||||
lua_pushnumber(l_state, static_cast<double>(object.as_value()));
|
lua_pushinteger(l_state, static_cast<int64_t>(object.as_value()));
|
||||||
break;
|
break;
|
||||||
case torrent::Object::TYPE_NONE:
|
case torrent::Object::TYPE_NONE:
|
||||||
lua_pushnil(l_state);
|
lua_pushnil(l_state);
|
||||||
|
|||||||
Reference in New Issue
Block a user