Prechádzať zdrojové kódy

2009-05-23 Atsushi Enomoto <[email protected]>

	* XmlBinaryDictionaryReader.cs : fix regression on stream consumption
	  excess.


svn path=/trunk/mcs/; revision=134669
Atsushi Eno 16 rokov pred
rodič
commit
148d3ddbf3

+ 5 - 0
mcs/class/System.Runtime.Serialization/System.Xml/ChangeLog

@@ -1,3 +1,8 @@
+2009-05-23  Atsushi Enomoto  <[email protected]>
+
+	* XmlBinaryDictionaryReader.cs : fix regression on stream consumption
+	  excess.
+
 2009-05-22  Atsushi Enomoto  <[email protected]>
 
 	* XmlBinaryDictionaryReader.cs : ReadContentString() returned

+ 2 - 0
mcs/class/System.Runtime.Serialization/System.Xml/XmlBinaryDictionaryReader.cs

@@ -72,6 +72,8 @@ namespace System.Xml
 
 			public int ReadByte ()
 			{
+				if (reader.PeekChar () < 0)
+					return -1;
 				return reader.ReadByte ();
 			}