* DeflateStream.cs: don't call unmanaged code when the byte count
is 0. Fixes bug #586870.
svn path=/trunk/mcs/; revision=153385
+2010-03-09 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * DeflateStream.cs: don't call unmanaged code when the byte count
+ is 0. Fixes bug #586870.
+
2009-12-23 Geoff Norton <gnorton@novell.com>
* DeflateStream.cs: Ensure our callbacks go into the correct
unsafe int ReadInternal (byte[] array, int offset, int count)
{
+ if (count == 0)
+ return 0;
+
int result = 0;
fixed (byte *b = array) {
IntPtr ptr = new IntPtr (b + offset);
unsafe void WriteInternal (byte[] array, int offset, int count)
{
+ if (count == 0)
+ return;
+
int result = 0;
fixed (byte *b = array) {
IntPtr ptr = new IntPtr (b + offset);