From c0380d1bfe596afe33659cc69ae99a09018f9908 Mon Sep 17 00:00:00 2001 From: dahlia Date: Fri, 6 Dec 2013 16:24:44 -0800 Subject: [PATCH] apparently mono DeflateStream has no CopyTo method =( --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index e313a302ae..d96de4ac8e 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -566,8 +566,12 @@ namespace OpenSim.Region.Physics.Meshing { byte[] readBuffer = new byte[2048]; inMs.Read(readBuffer, 0, 2); // skip first 2 bytes in header + int readLen = 0; - decompressionStream.CopyTo(outMs); + while ((readLen = decompressionStream.Read(readBuffer, 0, readBuffer.Length)) > 0) + outMs.Write(readBuffer, 0, readLen); + + outMs.Flush(); outMs.Seek(0, SeekOrigin.Begin);