Commit e7d7246b authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

#850 fixed wrong bounds cause ArrayIndexOutOfBoundsException

parent 6fbfd849
......@@ -505,7 +505,7 @@ public class PanoramaScreen extends AbstractTablexiaScreen<int[][]> {
int clickX = (int) (x / TablexiaSettings.getSceneWidth(getStage()) * clickmap.getRegionWidth());
int clickY = clickmap.getRegionHeight() - (int) (y / TablexiaSettings.getSceneInnerHeight(getStage()) * clickmap.getRegionHeight());
if( clickX < 0 || clickY < 0 || clickX > getData().length || clickY > getData()[0].length)
if( clickX < 0 || clickY < 0 || clickX >= getData().length || clickY >= getData()[0].length)
return Color.WHITE;
else
return new Color(getData()[clickX][clickY]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment