Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@gmail.com>2009-02-27 12:04:00 +0300
committerAtsushi Eno <atsushieno@gmail.com>2009-02-27 12:04:00 +0300
commit2bf962aa2a0a02afe44741866a20526d34033b3f (patch)
tree6a34df369fbab8bb0b6b222d2222973d99df332f /mcs/class/System.XML/System.Xml
parentc05620f4654893b7583a5d7f070d8507fd643f03 (diff)
2009-02-27 Atsushi Enomoto <atsushi@ximian.com>
* XmlReader.cs : do not try to read at non-readable state in MoveToContent(). svn path=/trunk/mcs/; revision=128185
Diffstat (limited to 'mcs/class/System.XML/System.Xml')
-rw-r--r--mcs/class/System.XML/System.Xml/ChangeLog5
-rw-r--r--mcs/class/System.XML/System.Xml/XmlReader.cs8
2 files changed, 13 insertions, 0 deletions
diff --git a/mcs/class/System.XML/System.Xml/ChangeLog b/mcs/class/System.XML/System.Xml/ChangeLog
index e28df623c27..6d3854f4d2f 100644
--- a/mcs/class/System.XML/System.Xml/ChangeLog
+++ b/mcs/class/System.XML/System.Xml/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-27 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlReader.cs : do not try to read at non-readable state in
+ MoveToContent().
+
2009-02-23 Alan McGovern <amcgovern@novell.com>
* XmlTextReader.cs: Under the SL2 profile, the default resolver
diff --git a/mcs/class/System.XML/System.Xml/XmlReader.cs b/mcs/class/System.XML/System.Xml/XmlReader.cs
index 7600ee2f1ff..1a363e97a01 100644
--- a/mcs/class/System.XML/System.Xml/XmlReader.cs
+++ b/mcs/class/System.XML/System.Xml/XmlReader.cs
@@ -544,6 +544,14 @@ namespace System.Xml
public virtual XmlNodeType MoveToContent ()
{
+ switch (ReadState) {
+ case ReadState.Initial:
+ case ReadState.Interactive:
+ break;
+ default:
+ return NodeType;
+ }
+
if (NodeType == XmlNodeType.Attribute)
MoveToElement ();