From f35356db11ecc2150f7806d61fc4acf965248330 Mon Sep 17 00:00:00 2001 From: Huw D M Davies Date: Sat, 25 Dec 1999 22:51:53 +0000 Subject: [PATCH] DPA_DeletePtr was resizing the array to a too small size. --- dlls/comctl32/comctl32undoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/comctl32undoc.c b/dlls/comctl32/comctl32undoc.c index d5337a281a4..83ca1aff070 100644 --- a/dlls/comctl32/comctl32undoc.c +++ b/dlls/comctl32/comctl32undoc.c @@ -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);