From 62dc95dbf918b9e68ad4996a9c247531498e8ab4 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Mon, 18 Sep 2006 21:42:43 +0000 Subject: [PATCH] Re-set the position in the byte array so that we can read from it using the IDataInput methods. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@72 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/as/com/threerings/ezgame/util/EZObjectMarshaller.as | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/as/com/threerings/ezgame/util/EZObjectMarshaller.as b/src/as/com/threerings/ezgame/util/EZObjectMarshaller.as index c102e2a7..326fccbc 100644 --- a/src/as/com/threerings/ezgame/util/EZObjectMarshaller.as +++ b/src/as/com/threerings/ezgame/util/EZObjectMarshaller.as @@ -62,6 +62,9 @@ public class EZObjectMarshaller return dest; } var bytes :ByteArray = (encoded as ByteArray); + // re-set the position in case we're decoding the actual same byte + // array used to encode (and not a network reconstruction) + bytes.position = 0; // TODO: Our own decoding, that takes into account // the ApplicationDomain