Skip to content

Commit

Permalink
corec: test array Heap has DATA_FLAG_MEMHEAP
Browse files Browse the repository at this point in the history
Otherwise we won't be able to read back the cc_memheap* from
the p->_Begin shift.
  • Loading branch information
robUx4 committed Jan 4, 2025
1 parent 830d183 commit 5a559b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions corec/corec/array/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ void ArrayInitEx(array* p,const cc_memheap* Heap)
if (Heap == NULL)
p->_Begin = NULL;
else
{
assert(Heap->Size & DATA_FLAG_MEMHEAP);
p->_Begin = (void*)Heap->data;
}
p->_Used = 0;
}

Expand Down

0 comments on commit 5a559b9

Please sign in to comment.