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:
parent
081030fb2f
commit
fd53278163
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue