Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix error when protopad is created while >10 lexicals already exist
  • Loading branch information
sorear committed Oct 20, 2011
1 parent 3da8e40 commit a77df2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Kernel.cs
Expand Up @@ -1698,6 +1698,11 @@ public class UsedInScopeInfo {
// or when we are
protopad = new Frame(null, outer != null ? outer.protopad : null,
this, protosub);
if (num_lex_slots > 10 && protopad.lexn == null) {
// nspill is zero at this point so protopad allocation is
// incomplete
protopad.lexn = new object[num_lex_slots - 10];
}

foreach (SubInfo z in children)
z.protosub = Kernel.MakeSub(z, protopad);
Expand Down

0 comments on commit a77df2e

Please sign in to comment.