fix: Bytearray expected, got function
This commit is contained in:
parent
1350910d28
commit
2d1c69ee7e
@ -39,7 +39,7 @@ function events.emit(event, ...)
|
||||
local status, newres = xpcall(func, __vc__error, ...)
|
||||
if not status then
|
||||
debug.error("error in event ("..event..") handler: "..newres)
|
||||
else
|
||||
else
|
||||
result = result or newres
|
||||
end
|
||||
end
|
||||
|
||||
@ -768,9 +768,12 @@ namespace lua {
|
||||
}
|
||||
|
||||
inline std::string_view bytearray_as_string(lua::State* L, int idx) {
|
||||
lua::requireglobal(L, "Bytearray_as_string");
|
||||
lua::pushvalue(L, idx);
|
||||
lua::requireglobal(L, "Bytearray_as_string");
|
||||
lua::pushvalue(L, -2);
|
||||
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;
|
||||
}
|
||||
logger.debug() << "read " << size << " bytes from " << to_string(addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user