From 1e100399f18f3c9a57dd09d7723ad6247625a769 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sun, 20 Nov 2011 20:35:45 +0000 Subject: [PATCH] - another fix in terrain deserialization for old files git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8741 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/terrain/com/jme3/terrain/GeoMap.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/terrain/com/jme3/terrain/GeoMap.java b/engine/src/terrain/com/jme3/terrain/GeoMap.java index f95848591..630516304 100644 --- a/engine/src/terrain/com/jme3/terrain/GeoMap.java +++ b/engine/src/terrain/com/jme3/terrain/GeoMap.java @@ -355,7 +355,8 @@ public class GeoMap implements Savable { if (hdata == null) { FloatBuffer buf = ic.readFloatBuffer("hdata", null); if (buf != null) { - hdata = buf.array(); + hdata = new float[buf.limit()]; + buf.get(hdata); } } width = ic.readInt("width", 0);