Skip to content

Commit

Permalink
Clone Element's temporaryVariables
Browse files Browse the repository at this point in the history
Clone Element's temporary variables dictionary instead of referencing the same dictionary (leading to variable errors in threads)
  • Loading branch information
cduquesne authored Aug 21, 2016
1 parent dbcc43c commit cff539c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ink-engine-runtime/CallStack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Element(PushPopType type, Container container, int contentIndex, bool inE
public Element Copy()
{
var copy = new Element (this.type, this.currentContainer, this.currentContentIndex, this.inExpressionEvaluation);
copy.temporaryVariables = this.temporaryVariables;
copy.temporaryVariables = new Dictionary<string,Object>(this.temporaryVariables);
return copy;
}
}
Expand Down

0 comments on commit cff539c

Please sign in to comment.