mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
fix: Bytearray expected, got function
This commit is contained in:
parent
1350910d28
commit
2d1c69ee7e
3 changed files with 6 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue