Listview regression

Dimitrie O. Paun dpaun at rogers.com
Sat Oct 19 17:22:40 CDT 2002


On October 19, 2002 11:34 am, David D. Hagood wrote:
> Second, when I do the "Along the way", the program cores out.

This one's tricky. Can you please retest (it will still crash),
and send me the log, after applying thing patch:

--- dlls/comctl32/listview.c.V0 Sat Oct 19 17:49:34 2002
+++ dlls/comctl32/listview.c    Sat Oct 19 18:21:55 2002
@@ -5678,12 +5678,14 @@
     is_sorted = (lStyle & (LVS_SORTASCENDING | LVS_SORTDESCENDING)) &&
                !(lStyle & LVS_OWNERDRAWFIXED) && (LPSTR_TEXTCALLBACKW != lpLVItem->pszText);

-    nItem = DPA_InsertPtr( infoPtr->hdpaItems,
-                          is_sorted ? infoPtr->nItemCount + 1 : lpLVItem->iItem,
-                          hdpaSubItems );
+    nItem = is_sorted ? infoPtr->nItemCount + 1 : lpLVItem->iItem;
+    TRACE(" inserting at %d, sorted=%d, count=%d, iItem=%d\n", nItem, is_sorted, infoPtr->nItemCount, lpLVItem->iItem);
+    nItem = DPA_InsertPtr( infoPtr->hdpaItems, nItem, hdpaSubItems );
+    TRACE(" result of insert is %d\n", nItem);
     if (nItem == -1) goto fail;
     /* the array may be sparsly populated, we can't just increment the count here */
     infoPtr->nItemCount = infoPtr->hdpaItems->nItemCount;
+    TRACE(" item count is %d\n", infoPtr->nItemCount);

     /* set the item attributes */
     if (!set_main_item(infoPtr, lpLVItem, TRUE, isW, &has_changed)) goto undo;


-- 
Dimi.




More information about the wine-devel mailing list