Skip to content

Commit 9d42ef2

Browse files
committed
corec: test array Heap has DATA_FLAG_MEMHEAP
Otherwise we won't be able to read back the cc_memheap* from the p->_Begin shift.
1 parent f91a95f commit 9d42ef2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

corec/corec/array/array.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ void ArrayInitEx(array* p,const cc_memheap* Heap)
126126
if (Heap == NULL)
127127
p->_Begin = NULL;
128128
else
129+
{
130+
assert(Heap->Size & DATA_FLAG_MEMHEAP);
129131
p->_Begin = (void*)Heap->data;
132+
}
130133
p->_Used = 0;
131134
}
132135

0 commit comments

Comments
 (0)