Handle LB_ERR (or indicated psooible error)
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Tue Jul 9 16:54:51 CDT 2002
Changelog:
controls/combo.c: CBUpdateEdit
LB_GETTEXTLEN returns LB_ERR on error, not NULL
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Free Software: If you contribute nothing, expect nothing
--
Index: wine/controls/combo.c
===================================================================
RCS file: /home/wine/wine/controls/combo.c,v
retrieving revision 1.84
diff -u -r1.84 combo.c
--- wine/controls/combo.c 13 Jun 2002 19:20:43 -0000 1.84
+++ wine/controls/combo.c 9 Jul 2002 21:51:53 -0000
@@ -771,6 +771,8 @@
if( (id = SendMessageW(lphc->hWndLBox, LB_GETCURSEL, 0, 0) ) != LB_ERR )
{
size = SendMessageW(lphc->hWndLBox, LB_GETTEXTLEN, id, 0);
+ if (size == LB_ERR)
+ FIXME("LB_ERR probably not handled yet\n");
if( (pText = HeapAlloc( GetProcessHeap(), 0, (size + 1) * sizeof(WCHAR))) )
{
/* size from LB_GETTEXTLEN may be too large, from LB_GETTEXT is accurate */
@@ -1113,7 +1115,7 @@
if( index >= 0 ) /* got an entry */
{
length = SendMessageW(lphc->hWndLBox, LB_GETTEXTLEN, (WPARAM)index, 0);
- if( length )
+ if( length != LB_ERR)
{
if( (pText = HeapAlloc( GetProcessHeap(), 0, (length + 1) * sizeof(WCHAR))) )
{
@@ -1538,7 +1540,8 @@
INT n = 0;
INT length = SendMessageW(lphc->hWndLBox, LB_GETTEXTLEN,
(WPARAM)idx, 0 );
-
+ if(length == LB_ERR)
+ FIXME("LB_ERR probably not handled yet\n");
if(unicode)
{
LPWSTR lpBuffer, lpText = (LPWSTR)lParam;
More information about the wine-patches
mailing list