1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 22:19:07 +00:00

Fix possible crash on End key in SceneEditor (thx KS-10 for reporting).

This was due to a logic bug mistaking tile indices with array indices.
This commit is contained in:
fgenesis 2012-09-17 03:25:13 +02:00
parent 42f4c2d1e6
commit 82e0be355c

View file

@ -3107,9 +3107,9 @@ void SceneEditor::selectEnd()
for (int i = 0; i < dsq->game->elementTemplates.size(); i++) for (int i = 0; i < dsq->game->elementTemplates.size(); i++)
{ {
ElementTemplate et = dsq->game->elementTemplates[i]; ElementTemplate et = dsq->game->elementTemplates[i];
if (et.idx < 1024 && et.idx > largest) if (et.idx < 1024 && i > largest)
{ {
largest = et.idx; largest = i;
} }
} }
curElement = largest; curElement = largest;