mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Fix out-of-bounds array access in findstartpoint()
Out-of-bounds array access is Undefined Behavior, which means Bad Things. In this particular case, it was indexing an array by using the `testeditor` variable. Which is fine, except it was indexing that array *in a conditional that only happens if `testeditor` is -1*. So it was indexing an array at position -1, which is Out of Bounds and is Not Good.
This commit is contained in:
parent
5934802fca
commit
31efc9b3ce
1 changed files with 1 additions and 1 deletions
|
@ -1595,7 +1595,7 @@ void editorclass::findstartpoint(Game& game)
|
||||||
game.edsavery = 100;
|
game.edsavery = 100;
|
||||||
game.edsavegc = 0;
|
game.edsavegc = 0;
|
||||||
game.edsavey--;
|
game.edsavey--;
|
||||||
game.edsavedir=1-edentity[testeditor].p1;
|
game.edsavedir=1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue