On Tue, 24 Sep 2002 22:20:02 -0500, you wrote: > ChangeSet ID: 5531 > CVSROOT: /opt/cvs-commit > Module name: wine > Changes by: [EMAIL PROTECTED] 2002/09/24 22:20:02 > > Modified files: > dlls/comctl32 : listview.c > > Log message: > Paul Rupe <[EMAIL PROTECTED]> > - Initialize memory to prevent crashes when -debugmsg +listview is on. > - Fix various array bounds related errors. > > Patch: http://cvs.winehq.com/patch.py?id=5531
This part causes trouble here: | @@ -6591,11 +6599,6 @@ | is_sorted = (lStyle & (LVS_SORTASCENDING | LVS_SORTDESCENDING)) && | !(lStyle & LVS_OWNERDRAWFIXED) && (LPSTR_TEXTCALLBACKW != |lpLVItem->pszText); | | - nItem = DPA_InsertPtr( infoPtr->hdpaItems, | - is_sorted ? GETITEMCOUNT( infoPtr ) + 1 : lpLVItem->iItem, | - hdpaSubItems ); | - if (nItem == -1) goto fail; | - | if (!LISTVIEW_SetItemT(infoPtr, lpLVItem, isW)) goto fail; | | /* if we're sorted, sort the list, and update the index */ | @@ -6606,6 +6609,14 @@ | if (nItem == -1) goto fail; | } | | + /* Add the subitem list to the items array. Do this last in case we go to | + * fail during the above. | + */ | + nItem = DPA_InsertPtr( infoPtr->hdpaItems, | + is_sorted ? GETITEMCOUNT( infoPtr ) + 1 : lpLVItem->iItem, | + hdpaSubItems ); | + if (nItem == -1) goto fail; | + | (before there were no failed calls and the list is not sorted) I did not look very hard at the cause, but it looks that LISTVIEW_SetItemT() depends on the inserted subitems in function set_main_item. Rein. -- Rein Klazes [EMAIL PROTECTED]