DPA_DeletePtr was resizing the array to a too small size.

This commit is contained in:
Huw D M Davies 1999-12-25 22:51:53 +00:00 committed by Alexandre Julliard
parent be89816eef
commit f35356db11
1 changed files with 1 additions and 1 deletions

View File

@ -1550,7 +1550,7 @@ DPA_DeletePtr (const HDPA hdpa, INT i)
/* free memory ?*/
if ((hdpa->nMaxCount - hdpa->nItemCount) >= hdpa->nGrow) {
INT nNewItems = MIN(hdpa->nGrow * 2, hdpa->nItemCount);
INT nNewItems = MAX(hdpa->nGrow * 2, hdpa->nItemCount);
nSize = nNewItems * sizeof(LPVOID);
lpDest = (LPVOID)HeapReAlloc (hdpa->hHeap, HEAP_ZERO_MEMORY,
hdpa->ptrs, nSize);