diff options
Diffstat (limited to 'mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs')
-rw-r--r-- | mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs index 72e5088ed38..9aab99f8386 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs @@ -192,13 +192,14 @@ namespace System.Security.Cryptography.Xml { { while (pos < nl.Count) { if (nl [pos].NodeType == XmlNodeType.Element) { - if (nl [pos].LocalName != name && nl [pos].NamespaceURI != ns) { + if (nl [pos].LocalName != name || nl [pos].NamespaceURI != ns) { if (required) throw new CryptographicException ("Malformed element " + name); else return -2; } - return pos; + else + return pos; } else pos++; |