From c649e49a42ad50da463273e4d76edf95270c6feb Mon Sep 17 00:00:00 2001 From: PRESFIL Date: Wed, 11 Jun 2025 18:34:26 +0000 Subject: [PATCH] fix(lua): Treat VALUE always as integer rtorrent doesn't have floating point data type --- src/rpc/lua.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/lua.cc b/src/rpc/lua.cc index 523eefe8..bebf5e01 100644 --- a/src/rpc/lua.cc +++ b/src/rpc/lua.cc @@ -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(object.as_value())); + lua_pushinteger(l_state, static_cast(object.as_value())); break; case torrent::Object::TYPE_NONE: lua_pushnil(l_state);