Fix bug #562056.
authorAnkit Jain <radical@corewars.org>
Mon, 14 Dec 2009 09:05:34 +0000 (09:05 -0000)
committerAnkit Jain <radical@corewars.org>
Mon, 14 Dec 2009 09:05:34 +0000 (09:05 -0000)
* Parameters.cs: Property name/value pairs can be separated by ':'.

svn path=/trunk/mcs/; revision=148371

mcs/tools/xbuild/ChangeLog
mcs/tools/xbuild/Parameters.cs

index 678a6b55fc956359eff9373971a743b9fc61f106..0ea1816e31395b915cc1d1662050f9487197e6cf 100644 (file)
@@ -1,3 +1,8 @@
+2009-12-14  Ankit Jain  <jankit@novell.com>
+
+       Fix bug #562056.
+       * Parameters.cs: Property name/value pairs can be separated by ':'.
+
 2009-11-26  Ankit Jain  <jankit@novell.com>
 
        * xbuild/Microsoft.Common.targets (PostBuildEvent): If
index 1f36902f43d89b368ddcf76dfd2a019403dec550..c330e45668b7a58f117fdd4c31679de3ac0ddb12 100644 (file)
@@ -230,14 +230,13 @@ namespace Mono.XBuild.CommandLine {
                
                internal bool ProcessProperty (string s)
                {
-                       string[] parameter, splittedProperties, property;
-                       parameter = s.Split (':');
-                       if (parameter.Length != 2) {
+                       int colon = s.IndexOf (':');
+                       if (colon + 1 == s.Length) {
                                ErrorUtilities.ReportError (5, "Property name and value expected as /p:<prop name>=<prop value>");
                                return false;
                        }
 
-                       splittedProperties = parameter [1].Split (';');
+                       string [] splittedProperties = s.Substring (colon + 1).Split (';');
                        foreach (string st in splittedProperties) {
                                if (st.IndexOf ('=') < 0) {
                                        ErrorUtilities.ReportError (5,
@@ -245,7 +244,7 @@ namespace Mono.XBuild.CommandLine {
                                                        "<prop name>=[<prop value>]");
                                        return false;
                                }
-                               property = st.Split ('=');
+                               string [] property = st.Split ('=');
                                properties.SetProperty (property [0], property.Length == 2 ? property [1] : "");
                        }