1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 14:38:30 +02:00

Add bounds check to drawgravityline()

I noticed that this function didn't have a bounds check, so I added one.
Just in case.
This commit is contained in:
Misa 2020-10-31 21:23:59 -07:00 committed by Ethan Lee
parent 081030fb2f
commit fd53278163

View File

@ -1455,6 +1455,12 @@ bool Graphics::Hitest(SDL_Surface* surface1, point p1, SDL_Surface* surface2, po
void Graphics::drawgravityline( int t )
{
if (!INBOUNDS_VEC(t, obj.entities))
{
WHINE_ONCE("drawgravityline() out-of-bounds!");
return;
}
if (obj.entities[t].life == 0 || obj.entities[t].onentity == 1) // FIXME: Remove 'onentity == 1' when game loop order is fixed!
{
switch(linestate)