فهرست منبع

2003-10-09 Gonzalo Paniagua Javier <[email protected]>

	* XmlTextReader.cs: when we get an unexpected EOF in ReadContent, set
	the state before throwing the exception if depth > 0.

svn path=/trunk/mcs/; revision=18786
Gonzalo Paniagua Javier 22 سال پیش
والد
کامیت
aebbfda1ff
2فایلهای تغییر یافته به همراه8 افزوده شده و 2 حذف شده
  1. 5 0
      mcs/class/System.XML/System.Xml/ChangeLog
  2. 3 2
      mcs/class/System.XML/System.Xml/XmlTextReader.cs

+ 5 - 0
mcs/class/System.XML/System.Xml/ChangeLog

@@ -1,3 +1,8 @@
+2003-10-09  Gonzalo Paniagua Javier <[email protected]>
+
+	* XmlTextReader.cs: when we get an unexpected EOF in ReadContent, set
+	the state before throwing the exception if depth > 0.
+
 2003-10-04  Atsushi Enomoto <[email protected]>
 
 	* XmlDocumentFragment.cs,

+ 3 - 2
mcs/class/System.XML/System.Xml/XmlTextReader.cs

@@ -1012,8 +1012,6 @@ namespace System.Xml
 					}
 					break;
 				case -1:
-					if (depth > 0)
-						throw new XmlException ("unexpected end of file. Current depth is " + depth);
 					readState = ReadState.EndOfFile;
 					SetProperties (
 						XmlNodeType.None, // nodeType
@@ -1022,6 +1020,9 @@ namespace System.Xml
 						(string) null, // value
 						true // clearAttributes
 					);
+					if (depth > 0)
+						throw new XmlException ("unexpected end of file. Current depth is " + depth);
+
 					return false;
 				default:
 					ReadText (true);