1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01: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)