Avoid a loop closure issue that caused incorrect sequence lookups.

This commit is contained in:
Paul Chote
2014-05-24 20:27:13 +12:00
parent 83f742c679
commit 51c5797a42

View File

@@ -105,8 +105,11 @@ namespace OpenRA.Graphics
.Aggregate(sequenceNodes, MiniYaml.MergeLiberal); .Aggregate(sequenceNodes, MiniYaml.MergeLiberal);
var items = new Dictionary<string, Lazy<IReadOnlyDictionary<string, Sequence>>>(); var items = new Dictionary<string, Lazy<IReadOnlyDictionary<string, Sequence>>>();
foreach (var node in nodes) foreach (var n in nodes)
{ {
// Work around the loop closure issue in older versions of C#
var node = n;
var key = node.Value.ToLines(node.Key).JoinWith("|"); var key = node.Value.ToLines(node.Key).JoinWith("|");
Lazy<IReadOnlyDictionary<string, Sequence>> t; Lazy<IReadOnlyDictionary<string, Sequence>> t;