1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00

Copy Transform objects more safely in Shader[Block]:send;

This commit is contained in:
bjorn 2018-09-05 04:22:12 -07:00
parent 1e351255f1
commit 7a8abc80a2

View file

@ -98,6 +98,7 @@ int luax_checkuniform(lua_State* L, int index, const Uniform* uniform, void* des
if (uniform->type == UNIFORM_MATRIX && lua_isuserdata(L, -1)) {
Transform* transform = luax_checktype(L, -1, Transform);
memcpy((float*) dest + i * components, transform->matrix, 16 * sizeof(float));
lua_pop(L, 1);
continue;
}