diff --git a/src/engine/InterestManagement/HeightMap.java b/src/engine/InterestManagement/HeightMap.java index 0abf12fa..ff03dbce 100644 --- a/src/engine/InterestManagement/HeightMap.java +++ b/src/engine/InterestManagement/HeightMap.java @@ -137,10 +137,10 @@ public class HeightMap { this.bucketWidthX = halfExtentsX; this.bucketWidthY = halfExtentsY; - this.pixelColorValues = new int[this.fullExtentsX + 1][this.fullExtentsY + 1]; + this.pixelColorValues = new int[this.fullExtentsX][this.fullExtentsY]; - for (int y = 0; y <= this.fullExtentsY; y++) { - for (int x = 0; x <= this.fullExtentsX; x++) { + for (int y = 0; y < this.fullExtentsY; y++) { + for (int x = 0; x < this.fullExtentsX; x++) { pixelColorValues[x][y] = 0; } } @@ -172,10 +172,10 @@ public class HeightMap { this.bucketWidthX = halfExtentsX; this.bucketWidthY = halfExtentsY; - this.pixelColorValues = new int[this.fullExtentsX + 1][this.fullExtentsY + 1]; + this.pixelColorValues = new int[this.fullExtentsX][this.fullExtentsY]; - for (int y = 0; y <= this.fullExtentsY; y++) { - for (int x = 0; x <= this.fullExtentsX; x++) { + for (int y = 0; y < this.fullExtentsY; y++) { + for (int x = 0; x < this.fullExtentsX; x++) { pixelColorValues[x][y] = 0; } }