Commit 017b9c83 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

Merge branch '850-arrayindexout-panoramascreen' into 'V3.7'

Resolve "ArrayIndexOutOfBoundsException v PanoramaScreen"

See merge request !650
parents 6fbfd849 e7d7246b
......@@ -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