mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Add bounds check to use of edteleportent
edteleportent is a global variable that gets assigned whenever the player collides with a warp token, and gets read from later down the line in gamelogic(). While I don't know of any way to cause anything bad with this (and I did try), storing a temporary indexing variable like this is only bound to be a liability in the future - so we might as well prevent badness now by adding a bounds check here.
This commit is contained in:
parent
e3145c09f2
commit
a0d40b5d74
1 changed files with 1 additions and 1 deletions
|
@ -1188,7 +1188,7 @@ void gamelogic(void)
|
|||
|
||||
//Warp tokens
|
||||
if (map.custommode){
|
||||
if (game.teleport)
|
||||
if (game.teleport && INBOUNDS_VEC(game.edteleportent, obj.entities))
|
||||
{
|
||||
int edi=obj.entities[game.edteleportent].behave;
|
||||
int edj=obj.entities[game.edteleportent].para;
|
||||
|
|
Loading…
Reference in a new issue