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:
Diffstat (limited to 'mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs')
-rw-r--r--mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs b/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs
index abd904bc987..6bd8a339a0e 100644
--- a/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs
+++ b/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs
@@ -366,11 +366,16 @@ namespace Mono.Xml.XPath
if (another == null || another.document != this.document)
return false;
- return this.currentNode == another.currentNode &&
- this.currentAttr == another.currentAttr &&
- this.currentIsAttr == another.currentIsAttr &&
- this.currentIsNode == another.currentIsNode &&
- this.currentNs == another.currentNs;
+ if (this.currentNode != another.currentNode ||
+ this.currentIsAttr != another.currentIsAttr ||
+ this.currentIsNode != another.currentIsNode)
+ return false;
+
+ if (currentIsAttr)
+ return this.currentAttr == another.currentAttr;
+ else if (!currentIsNode)
+ return this.currentNs == another.currentNs;
+ return true;
}
public override bool MoveTo (XPathNavigator other)