mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-04 06:54:39 +00:00
Fix possible crash when moving the Y-axis of camera out of bounds when zoomed out.
This was a regression from my earlier GridRender optimization patch.
This commit is contained in:
parent
82e0be355c
commit
755cc9c50f
1 changed files with 2 additions and 0 deletions
|
@ -108,6 +108,8 @@ void GridRender::onRender()
|
||||||
startY = 0;
|
startY = 0;
|
||||||
if (endY >= MAX_GRID)
|
if (endY >= MAX_GRID)
|
||||||
endY = MAX_GRID-1;
|
endY = MAX_GRID-1;
|
||||||
|
if (startY > endY)
|
||||||
|
return;
|
||||||
for (int x = startX; x <= endX; ++x)
|
for (int x = startX; x <= endX; ++x)
|
||||||
{
|
{
|
||||||
const signed char *gridColumn = dsq->game->getGridColumn(x);
|
const signed char *gridColumn = dsq->game->getGridColumn(x);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue