fix: Bytearray expected, got function

This commit is contained in:
MihailRis 2025-09-28 21:44:04 +03:00
parent 1350910d28
commit 2d1c69ee7e
3 changed files with 6 additions and 4 deletions

View File

@ -768,9 +768,12 @@ namespace lua {
} }
inline std::string_view bytearray_as_string(lua::State* L, int idx) { inline std::string_view bytearray_as_string(lua::State* L, int idx) {
lua::requireglobal(L, "Bytearray_as_string");
lua::pushvalue(L, idx); lua::pushvalue(L, idx);
lua::requireglobal(L, "Bytearray_as_string");
lua::pushvalue(L, -2);
lua::call(L, 1, 1); lua::call(L, 1, 1);
return lua::tolstring(L, -1); auto view = lua::tolstring(L, -1);
lua::pop(L);
return view;
} }
} }

View File

@ -379,7 +379,6 @@ public:
} }
totalDownload += size; totalDownload += size;
} }
logger.debug() << "read " << size << " bytes from " << to_string(addr);
} }
} }