Fix #75679.
authorRaja R Harinath <harinath@hurrynot.org>
Tue, 23 Aug 2005 12:17:17 +0000 (12:17 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Tue, 23 Aug 2005 12:17:17 +0000 (12:17 -0000)
* StreamReader.cs (DiscardBufferedData): Reset the decoder too.

(r=eno)

svn path=/trunk/mcs/; revision=48719

mcs/class/corlib/System.IO/ChangeLog
mcs/class/corlib/System.IO/StreamReader.cs

index 4d366081cec75a8ec0518b817f74436a76a52b4f..f770c132bc6bd69cbcdfb8f6b943adf002d8061f 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-23  Raja R Harinath  <rharinath@novell.com>
+
+       Fix #75679.
+       * StreamReader.cs (DiscardBufferedData): Reset the decoder too.
+
 2005-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * BinaryReader.cs: use Buffer.BlockCopy instead of Array.Copy when
index 77a3d15a1b427c2e3cb9bbeb6014d9b5902a025d..50e92b5b1cdbc7a236f707b13660f8aa6b87c3fa 100644 (file)
@@ -284,6 +284,8 @@ namespace System.IO {
                {
                        pos = decoded_count = 0;
                        mayBlock = false;
+                       // Discard internal state of the decoder too.
+                       decoder = encoding.GetDecoder ();
                }
                
                // the buffer is empty, fill it again