mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-05 17:52:29 +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
|
||||
switch (object.type()) {
|
||||
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;
|
||||
case torrent::Object::TYPE_NONE:
|
||||
lua_pushnil(l_state);
|
||||
|
||||
Reference in New Issue
Block a user