comboex fix

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

 



use the supplied buffer when copying item text.

-aric
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;

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

  Powered by Linux