mirror of https://github.com/bjornbytes/lovr.git
Fix Pass:send('bool', bool);
This commit is contained in:
parent
ba7bdd11c3
commit
460ae0f6a0
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue