File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -853,7 +853,7 @@ static enum cc_stat expand_capacity(CC_Array *ar)
853
853
else
854
854
ar -> capacity = new_capacity ;
855
855
856
- void * * new_buff = ar -> mem_alloc (new_capacity * sizeof (void * ));
856
+ void * * new_buff = ar -> mem_alloc (ar -> capacity * sizeof (void * ));
857
857
858
858
if (!new_buff )
859
859
return CC_ERR_ALLOC ;
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ static enum cc_stat expand_capacity(CC_PQueue *pq)
193
193
else
194
194
pq -> capacity = new_capacity ;
195
195
196
- void * * new_buff = pq -> mem_alloc (new_capacity * sizeof (void * ));
196
+ void * * new_buff = pq -> mem_alloc (pq -> capacity * sizeof (void * ));
197
197
198
198
if (!new_buff )
199
199
return CC_ERR_ALLOC ;
Original file line number Diff line number Diff line change @@ -809,7 +809,7 @@ static enum cc_stat expand_capacity(CC_ArraySized *ar)
809
809
} else {
810
810
ar -> capacity = new_capacity ;
811
811
}
812
- uint8_t * new_buff = ar -> mem_alloc (new_capacity * ar -> data_length );
812
+ uint8_t * new_buff = ar -> mem_alloc (ar -> capacity * ar -> data_length );
813
813
814
814
if (!new_buff ) {
815
815
return CC_ERR_ALLOC ;
You can’t perform that action at this time.
0 commit comments