Fix length check in PSSnapinQualifiedName.GetInstance() (#8837)

This commit is contained in:
Tom Hvitved
2019-02-08 23:50:19 +05:00
committed by Ilya
parent 98c360205f
commit 5f59a9dfef
@@ -68,7 +68,7 @@ namespace System.Management.Automation
return null;
PSSnapinQualifiedName result = null;
string[] splitName = name.Split(Utils.Separators.Backslash);
if (splitName.Length < 0 || splitName.Length > 2)
if (splitName.Length == 0 || splitName.Length > 2)
return null;
result = new PSSnapinQualifiedName(splitName);
// If the shortname is empty, then return null...