From 5a79adc4fed2dbc85cacaf3ffc7b9002581b4a2a Mon Sep 17 00:00:00 2001 From: "bre..ns" Date: Thu, 9 Jun 2011 20:26:36 +0000 Subject: [PATCH] fixed bug in abstractHeightmap.smooth, thanks to ozonegrif git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7563 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../terrain/com/jme3/terrain/heightmap/AbstractHeightMap.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/terrain/com/jme3/terrain/heightmap/AbstractHeightMap.java b/engine/src/terrain/com/jme3/terrain/heightmap/AbstractHeightMap.java index 5c5637375..f701aa118 100644 --- a/engine/src/terrain/com/jme3/terrain/heightmap/AbstractHeightMap.java +++ b/engine/src/terrain/com/jme3/terrain/heightmap/AbstractHeightMap.java @@ -447,10 +447,10 @@ public abstract class AbstractHeightMap implements HeightMap { for (int d = 0; d < 8; d++) { int i = x + dxs[d]; int j = y + dys[d]; - if (i < 0 || i > size) { + if (i < 0 || i >= size) { continue; } - if (j < 0 || j > size) { + if (j < 0 || j >= size) { continue; } neighNumber++;