Skip to content

Commit

Permalink
Add missing CHANGED_BAG in PushValue
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed Jan 21, 2019
1 parent a80fe12 commit f56a68c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/code.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,12 @@ static Int PushValue(Obj val)
Obj values = header->values;
if (!values) {
values = NEW_PLIST(T_PLIST, 4);
// Recalculate header in case NEW_PLIST caused a GC
header = (BodyHeader *)STATE(PtrBody);
header->values = values;
GAP_ASSERT(STATE(PtrBody) == (Stat *)PTR_BAG(BODY_FUNC(CURR_FUNC())));
// This is the bag PtrBody points at
CHANGED_BAG(BODY_FUNC(CURR_FUNC()));
}
return PushPlist(values, val);
}
Expand Down

0 comments on commit f56a68c

Please sign in to comment.