mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03: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:
@@ -1595,7 +1595,7 @@ void editorclass::findstartpoint(Game& game)
|
||||
game.edsavery = 100;
|
||||
game.edsavegc = 0;
|
||||
game.edsavey--;
|
||||
game.edsavedir=1-edentity[testeditor].p1;
|
||||
game.edsavedir=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user