Add missing bounds checks to ItemTextureQuadConverter (#4343)

This commit is contained in:
Ben Staddon authored and LexManos committed 2017-09-06 14:08:19 -07:00
1 parent da85dcadf5
commit ef5ffc2c5d
1 file changed
+2 -2
@@ -92,7 +92,7 @@ public final class ItemTextureQuadConverter
// if they are, we can extend the quad downwards
int endY = y + 1;
boolean sameRow = true;
while (sameRow)
while (sameRow && endY < h)
{
for (int i = 0; i < w; i++)
{
@@ -166,7 +166,7 @@ public final class ItemTextureQuadConverter
// if they are, we can extend the quad downwards
int endX = x + 1;
boolean sameColumn = true;
while (sameColumn)
while (sameColumn && endX < w)
{
for (int i = 0; i < h; i++)
{