Re: Listview updates (G0)

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

 



On 28 Sep 2002, dpaun@rogers.com wrote:

> Which means that notify_dispinfoT is broken. This way we find the bug,
> which is my point exactly against adding this zero memory calls. Not
> only they bloat the code, making it slower, harder to read, etc., but
> most importantly they hide exactly this types of bugs.

Point taken.  I see what you mean now.

Here's another patch that is hopefully in the same spirit. 
LISTVIEW_SetItemState uses debuglvitem_t for logging, but none of its 
callers fill in the lpLVItem->mask member since LVIF_STATE is assumed. 
However, debuglvitem_t doesn't know this, hence the crash.

Changelog
  Paul Rupe <prupe@myrealbox.com>
  Prevent crash when listview trace logging is on


Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.156
diff -u -r1.156 listview.c
--- dlls/comctl32/listview.c	29 Sep 2002 18:34:51 -0000	1.156
+++ dlls/comctl32/listview.c	29 Sep 2002 19:32:23 -0000
@@ -7428,13 +7428,14 @@
   BOOL bResult = TRUE;
   LVITEMW lvItem;
 
-  TRACE("(nItem=%d, lpLVItem=%s)\n", nItem, debuglvitem_t(lpLVItem, TRUE));
+  TRACE("(nItem=%d, state=%x, stateMask=%x)\n", nItem, lpLVItem->state,
+        lpLVItem->stateMask);
 
   lvItem.iItem = nItem;
   lvItem.iSubItem = 0;
   lvItem.mask = LVIF_STATE;
   lvItem.state = lpLVItem->state;
-  lvItem.stateMask = lpLVItem->stateMask ;
+  lvItem.stateMask = lpLVItem->stateMask;
 
   if (nItem == -1)
   {




-- 
Paul Rupe                                        "She smiled, in the end."
p r u p e @ m y r e a l b o x . c o m

| Oppose government police-ware on your PC!
| Stop the Consumer Broadband and Digital Television Promotion Act!
| <http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html>


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

  Powered by Linux