From 2aa6f9f5212451ebb6f9e5460736e95f90e7da36 Mon Sep 17 00:00:00 2001 From: NemesisMate Date: Thu, 26 Feb 2015 14:41:29 +0100 Subject: [PATCH] Fixed BufferUnderflowException Fixed the exception occurring when using this serializer. More commented here: http://hub.jmonkeyengine.org/t/savableserializer-and-client-bufferunderflowexception/31774 --- .../jme3/network/serializing/serializers/SavableSerializer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-networking/src/main/java/com/jme3/network/serializing/serializers/SavableSerializer.java b/jme3-networking/src/main/java/com/jme3/network/serializing/serializers/SavableSerializer.java index 47be44129..c91c8e4c5 100644 --- a/jme3-networking/src/main/java/com/jme3/network/serializing/serializers/SavableSerializer.java +++ b/jme3-networking/src/main/java/com/jme3/network/serializing/serializers/SavableSerializer.java @@ -93,7 +93,7 @@ public class SavableSerializer extends Serializer { @Override public int read(byte[] b, int off, int len){ int toRead = len > input.remaining() ? input.remaining() : len; - input.get(b, off, len); + input.get(b, off, toRead); return toRead; }