Skip to content

Commit

Permalink
v2.5.7 - add & as a valid char for key values.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarbian committed Jan 6, 2015
1 parent cf05f93 commit 77204a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Expand Up @@ -17,7 +17,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("2.5.6")]
[assembly: AssemblyVersion("2.5.7")]
[assembly: KSPAssembly("ModuleManager", 2, 5)]

// The following attributes are used to specify the signing key for the assembly,
Expand Down
4 changes: 2 additions & 2 deletions moduleManager.cs
Expand Up @@ -1093,7 +1093,7 @@ public IEnumerator ApplyPatch(List<String> excludePaths, string Stage)
}

// Name is group 1, index is group 2, operator is group 3
private static Regex parseValue = new Regex(@"([\w\-\.\?\*]*)(?:,(-?[0-9]+))?(?:\s([+\-*/^!]))?");
private static Regex parseValue = new Regex(@"([\w\&\-\.\?\*]*)(?:,(-?[0-9]+))?(?:\s([+\-*/^!]))?");

// ModifyNode applies the ConfigNode mod as a 'patch' to ConfigNode original, then returns the patched ConfigNode.
// it uses FindConfigNodeIn(src, nodeType, nodeName, nodeTag) to recurse.
Expand Down Expand Up @@ -1450,7 +1450,7 @@ public ConfigNode ModifyNode(ConfigNode original, ConfigNode mod)
}

// KeyName is group 1, index is group 2, value indexis group 3, value separator is group 4
private static readonly Regex parseVarKey = new Regex(@"([\w\-\.]+)(?:,((?:[0-9]+)+))?(?:\[((?:[0-9]+)+)(?:,(.))?\])?");
private static readonly Regex parseVarKey = new Regex(@"([\w\&\-\.]+)(?:,((?:[0-9]+)+))?(?:\[((?:[0-9]+)+)(?:,(.))?\])?");

// Search for a value by a path alike string
private static string RecurseVariableSearch(string path, ConfigNode currentNode)
Expand Down

0 comments on commit 77204a1

Please sign in to comment.