Fixed bug with BoundingBox Lua constructor

Fixed use-after-free in DestroyLight
This commit is contained in:
ghassanpl 2016-08-06 22:14:49 +02:00
commit 47b6e62744
2 changed files with 5 additions and 4 deletions

View file

@ -768,7 +768,7 @@ static int lua_BoundingBox(lua_State* L)
{
Vector3 min = LuaGetArgument_Vector3(L, 1);
Vector3 max = LuaGetArgument_Vector3(L, 2);
LuaPush_BoundingBox(L, (BoundingBox) { { min.x, min.y }, { max.x, max.y } });
LuaPush_BoundingBox(L, (BoundingBox) { { min.x, min.y, min.z }, { max.x, max.y, max.z } });
return 1;
}