comctl32: Use mask value in COMBOEX_GetItemA too (ignore the
previous patches)
Samuel Lidén Borell
samuellb at bredband.net
Fri Feb 23 13:27:58 CST 2007
Sorry for the spam.
Description of the patch:
The mask value was not taken into account in the ASCII version of this
function. That made Notepad2 crash when selecting a syntax scheme.
-------------- next part --------------
>From nobody Mon Sep 17 00:00:00 2001
From: Samuel Liden Borell <samuellb at bredband.net>
Date: Fri Feb 23 20:09:27 2007 +0100
Subject: [PATCH] comctl32: Use mask value in COMBOEX_GetItemA too
The mask value was not taken into account in the ASCII version of this
function. That made Notepad2 crash when selecting a syntax scheme.
---
dlls/comctl32/comboex.c | 30 +++++++++++++++++++-----------
1 files changed, 19 insertions(+), 11 deletions(-)
adbec512b5c54f9beddfd077596184038ff8b623
diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c
index 2499b80..2a683eb 100644
--- a/dlls/comctl32/comboex.c
+++ b/dlls/comctl32/comboex.c
@@ -577,17 +577,25 @@ static BOOL COMBOEX_GetItemA (COMBOEX_IN
tmpcit.pszText = 0;
if(!COMBOEX_GetItemW (infoPtr, &tmpcit)) return FALSE;
- if (is_textW(tmpcit.pszText) && cit->pszText)
- WideCharToMultiByte (CP_ACP, 0, tmpcit.pszText, -1,
- cit->pszText, cit->cchTextMax, NULL, NULL);
- else if (cit->pszText) cit->pszText[0] = 0;
- else cit->pszText = (LPSTR)tmpcit.pszText;
-
- cit->iImage = tmpcit.iImage;
- cit->iSelectedImage = tmpcit.iSelectedImage;
- cit->iOverlay = tmpcit.iOverlay;
- cit->iIndent = tmpcit.iIndent;
- cit->lParam = tmpcit.lParam;
+ if (cit->mask & CBEIF_TEXT)
+ {
+ if (is_textW(tmpcit.pszText) && cit->pszText)
+ WideCharToMultiByte(CP_ACP, 0, tmpcit.pszText, -1,
+ cit->pszText, cit->cchTextMax, NULL, NULL);
+ else if (cit->pszText) cit->pszText[0] = 0;
+ else cit->pszText = (LPSTR)tmpcit.pszText;
+ }
+
+ if (cit->mask & CBEIF_IMAGE)
+ cit->iImage = tmpcit.iImage;
+ if (cit->mask & CBEIF_SELECTEDIMAGE)
+ cit->iSelectedImage = tmpcit.iSelectedImage;
+ if (cit->mask & CBEIF_OVERLAY)
+ cit->iOverlay = tmpcit.iOverlay;
+ if (cit->mask & CBEIF_INDENT)
+ cit->iIndent = tmpcit.iIndent;
+ if (cit->mask & CBEIF_LPARAM)
+ cit->lParam = tmpcit.lParam;
return TRUE;
}
--
1.2.6
More information about the wine-patches
mailing list