Skip to content

Commit

Permalink
Add missing check to SHRINK_PLIST
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson authored and fingolfin committed Aug 24, 2017
1 parent cf08ca4 commit fb9f480
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/plist.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ static inline void GROW_PLIST(Obj list, Int plen)
static inline void SHRINK_PLIST(Obj list, Int plen)
{
GAP_ASSERT(IS_PLIST_OR_POSOBJ(list));
GAP_ASSERT(plen >= 0);
GAP_ASSERT(plen <= CAPACITY_PLIST(list));
ResizeBag(list, (plen + 1) * sizeof(Obj));
}
Expand Down

0 comments on commit fb9f480

Please sign in to comment.