fix: Bytearray expected, got function
This commit is contained in:
parent
1350910d28
commit
2d1c69ee7e
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -379,7 +379,6 @@ public:
|
|||||||
}
|
}
|
||||||
totalDownload += size;
|
totalDownload += size;
|
||||||
}
|
}
|
||||||
logger.debug() << "read " << size << " bytes from " << to_string(addr);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user