comctl32/listview: fix overwriting of item values
Daniel Jelinski
djelinski1 at gmail.com
Sat Mar 9 00:03:16 CST 2013
-------------- next part --------------
From 6e0d238dc73a96d70a44b92f73905b6edb9cebfb Mon Sep 17 00:00:00 2001
From: Daniel Jelinski <djelinski1 at gmail.com>
Date: Sat, 9 Mar 2013 06:52:53 +0100
Subject: [PATCH] comctl32/listview: fix overwriting of item values
See the comment on LISTVIEW_GetItemT - it may either overwrite the text or return its own.
This patch fixes bug 20637.
---
dlls/comctl32/listview.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index b084e5e..52717e9 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -8290,10 +8290,10 @@ static BOOL LISTVIEW_SetColumnWidth(LISTVIEW_INFO *infoPtr, INT nColumn, INT cx)
lvItem.mask = LVIF_TEXT;
lvItem.iItem = 0;
lvItem.iSubItem = nColumn;
- lvItem.pszText = szDispText;
lvItem.cchTextMax = DISP_TEXT_SIZE;
for (; lvItem.iItem < infoPtr->nItemCount; lvItem.iItem++)
{
+ lvItem.pszText = szDispText;
if (!LISTVIEW_GetItemW(infoPtr, &lvItem)) continue;
nLabelWidth = LISTVIEW_GetStringWidthT(infoPtr, lvItem.pszText, TRUE);
if (max_cx < nLabelWidth) max_cx = nLabelWidth;
--
1.7.5.4
More information about the wine-patches
mailing list