Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Build/Evaluation/ExpressionShredder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,9 @@ private static void GetReferencedItemNamesAndMetadata(string expression, int sta
i--;
}

// Grab the name, but continue to verify it's a well-formed expression
// Grab the name boundaries, but continue to verify it's a well-formed expression
// before we store it.
string name = expression.Substring(startOfName, i - startOfName);
int nameLength = i - startOfName;

SinkWhitespace(expression, ref i);

Expand Down Expand Up @@ -378,7 +378,7 @@ private static void GetReferencedItemNamesAndMetadata(string expression, int sta
if ((whatToShredFor & ShredderOptions.ItemTypes) != 0)
{
pair.Items ??= new HashSet<string>(MSBuildNameIgnoreCaseComparer.Default);
pair.Items.Add(name);
pair.Items.Add(expression.Substring(startOfName, nameLength));
}

i--;
Expand Down