From 33d19f7a690bdebab38ec1dadb3dd63e28d98789 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Thu, 24 Sep 2009 19:37:34 +0000 Subject: [PATCH] Another fix for potential streaming errors. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5967 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/io/streamers/ByteArrayStreamer.as | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/as/com/threerings/io/streamers/ByteArrayStreamer.as b/src/as/com/threerings/io/streamers/ByteArrayStreamer.as index 2aae95dcf..e2bfd773c 100644 --- a/src/as/com/threerings/io/streamers/ByteArrayStreamer.as +++ b/src/as/com/threerings/io/streamers/ByteArrayStreamer.as @@ -54,7 +54,9 @@ public class ByteArrayStreamer extends Streamer override public function readObject (obj :Object, ins :ObjectInputStream) :void { var bytes :ByteArray = (obj as ByteArray); - ins.readBytes(bytes, 0, bytes.length); + if (bytes.length > 0) { + ins.readBytes(bytes, 0, bytes.length); + } } } }