Merge branch 'dev' into client-server-logic-split

This commit is contained in:
MihailRis 2026-04-27 02:18:33 +03:00
commit d0f3e0ee80
4 changed files with 9 additions and 6 deletions

View file

@ -65,7 +65,7 @@ static int l_set_params(lua::State* L) {
static int l_set_array(lua::State* L) {
size_t index = static_cast<size_t>(lua::tointeger(L, 1));
auto key = lua::require_string(L, 2);
auto data = lua::require_lstring(L, 3);
auto data = lua::bytearray_as_string(L, 3);
auto effect = post_processing->getEffect(index);
if (effect == nullptr) {
return 0;

View file

@ -829,6 +829,9 @@ namespace lua {
}
inline std::string_view bytearray_as_string(lua::State* L, int idx) {
if (type(L, idx) == LUA_TSTRING) {
return tolstring(L, idx);
}
pushvalue(L, idx);
requireglobal(L, "Bytearray_as_string");
pushvalue(L, -2);