[Microsoft.Build.Utilities] Fixed to make unit tests pass again
authorJeffrey Stedfast <jeff@xamarin.com>
Fri, 6 Feb 2015 17:23:14 +0000 (12:23 -0500)
committerJeffrey Stedfast <jeff@xamarin.com>
Fri, 6 Feb 2015 17:24:18 +0000 (12:24 -0500)
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/MSBuildErrorParser.cs

index b536461242ed43db0890aaf29a545145cd180665..d2e20fc95ea91467400fb011b5ebfbb6423bf2cc 100644 (file)
@@ -81,7 +81,7 @@ namespace Microsoft.Build.Utilities
 
                        int categoryStart = originEnd + 2;
 
-                       if (categoryStart >= line.Length)
+                       if (categoryStart > line.Length)
                                return null;
 
                        MovePrevNonSpace (line, ref originEnd);
@@ -93,9 +93,6 @@ namespace Microsoft.Build.Utilities
                        //find the category section, if there is one
                        MoveNextNonSpace (line, ref categoryStart);
 
-                       if (categoryStart >= line.Length)
-                               return null;
-
                        int categoryEnd = line.IndexOf (':', categoryStart) - 1;
                        int messageStart = categoryEnd + 2;