Skip to content

Commit

Permalink
Allow null value in wildcard match
Browse files Browse the repository at this point in the history
Allows for instance :HAS[#someValue] instead of :HAS[#someValue[*]]
  • Loading branch information
blowfishpro committed Oct 22, 2018
1 parent e941160 commit fef3110
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ModuleManager/MMPatchLoader.cs
Expand Up @@ -1799,7 +1799,7 @@ public static bool CheckConstraints(ConfigNode node, string constraints)
public static bool WildcardMatchValues(ConfigNode node, string type, string value)
{
double val = 0;
bool compare = value.Length > 1 && (value[0] == '<' || value[0] == '>');
bool compare = value != null && value.Length > 1 && (value[0] == '<' || value[0] == '>');
compare = compare && double.TryParse(value.Substring(1), NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out val);

string[] values = node.GetValues(type);
Expand Down

0 comments on commit fef3110

Please sign in to comment.