comboex fix

Aric Stewart aric at codeweavers.com
Wed Feb 6 09:01:59 CST 2002


use the supplied buffer when copying item text.

-aric
-------------- next part --------------
Index: dlls/comctl32/comboex.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/comboex.c,v
retrieving revision 1.38
diff -u -u -r1.38 comboex.c
--- dlls/comctl32/comboex.c	2002/01/04 21:50:01	1.38
+++ dlls/comctl32/comboex.c	2002/02/06 12:57:20
@@ -329,8 +329,18 @@
 COMBOEX_CopyItem (COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item, COMBOBOXEXITEMW *cit)
 {
     if (cit->mask & CBEIF_TEXT) {
-        cit->pszText        = item->pszText;
-        cit->cchTextMax     = item->cchTextMax;
+        /*
+         * when given a text buffer actaully use that buffer
+         */
+        if (cit->pszText)
+        {
+            lstrcpynW(cit->pszText,item->pszText,cit->cchTextMax);
+        }
+        else
+        {
+            cit->pszText        = item->pszText;
+            cit->cchTextMax     = item->cchTextMax;
+        }
     }
     if (cit->mask & CBEIF_IMAGE)
 	cit->iImage         = item->iImage;


More information about the wine-patches mailing list