TheAssemblyArmada / Thyme

An open source re-implementation of Generals : Zero Hour written in C++.
GNU General Public License v2.0
585 stars 59 forks source link

W3DShadowManager::Get_Light_Pos_World is unsafe #1047

Open xezon opened 10 months ago

xezon commented 10 months ago
Vector3 g_lightPosWorld[1] = { Vector3(94.016098f, 50.499001f, 200.0f) };

Vector3 &W3DShadowManager::Get_Light_Pos_World(int light_index)
{
    return g_lightPosWorld[light_index];
}

There needs to be an assert at least.