Fix Pass:send('bool', bool);

This commit is contained in:
bjorn 2022-08-19 22:26:20 -07:00
parent ba7bdd11c3
commit 460ae0f6a0
1 changed files with 8 additions and 0 deletions

View File

@ -567,6 +567,14 @@ static int l_lovrPassSend(lua_State* L) {
void* data;
FieldType type;
lovrPassSendValue(pass, name, length, &data, &type);
// readbufferfield doesn't handle booleans
if (lua_type(L, 3) == LUA_TBOOLEAN) {
bool value = lua_toboolean(L, 3);
lua_settop(L, 2);
lua_pushinteger(L, value);
}
luax_readbufferfield(L, 3, type, data);
return 0;
}