diff --git a/src/System.Management.Automation/engine/MshSnapinQualifiedName.cs b/src/System.Management.Automation/engine/MshSnapinQualifiedName.cs index e2efed9952..94231ed865 100644 --- a/src/System.Management.Automation/engine/MshSnapinQualifiedName.cs +++ b/src/System.Management.Automation/engine/MshSnapinQualifiedName.cs @@ -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...