DPA_InsertPtr (A1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




ChangeLog
  Fix memory corruption introduced by the previous rewrite.

--- dlls/comctl32/comctl32undoc.c.A0	Sun Oct 20 11:39:48 2002
+++ dlls/comctl32/comctl32undoc.c	Sun Oct 20 11:40:25 2002
@@ -1884,7 +1884,7 @@
 
     /* create empty spot at the end */
     if (!DPA_SetPtr(hdpa, hdpa->nItemCount, 0)) return -1;
-    memmove (hdpa->ptrs + i + 1, hdpa->ptrs + i, (hdpa->nItemCount - i) * sizeof(LPVOID));
+    memmove (hdpa->ptrs + i + 1, hdpa->ptrs + i, (hdpa->nItemCount - i - 1) * sizeof(LPVOID));
     hdpa->ptrs[i] = p;
     hdpa->nItemCount++;
     return i;



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux