mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-06 14:23:34 +00:00
Fix flipped condition when writing buffer data;
This commit is contained in:
parent
9c054c0515
commit
01ba9927c1
|
@ -265,7 +265,7 @@ void luax_readbufferdata(lua_State* L, int index, Buffer* buffer, char* data) {
|
||||||
luaL_checktype(L, index, LUA_TTABLE);
|
luaL_checktype(L, index, LUA_TTABLE);
|
||||||
lovrCheck(info->fields, "Buffer must be created with format information to copy a table to it");
|
lovrCheck(info->fields, "Buffer must be created with format information to copy a table to it");
|
||||||
|
|
||||||
if (info->fields[0].length > 0) {
|
if (info->fields[0].length == 0) {
|
||||||
data = data ? data : lovrBufferMap(buffer, 0, info->size);
|
data = data ? data : lovrBufferMap(buffer, 0, info->size);
|
||||||
luax_readbufferfield(L, index, info->fields, data);
|
luax_readbufferfield(L, index, info->fields, data);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue