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
1 changed files with 1 additions and 0 deletions

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;
}