[Rebar] Don't store band text if "" is passed into SetBandInfo

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

 



Hi,

This makes IE look a bit neater.

Rob

Changelog:
- Don't store band text if "" is passed into SetBandInfo
Index: wine/dlls/comctl32/rebar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/rebar.c,v
retrieving revision 1.78
diff -u -r1.78 rebar.c
--- wine/dlls/comctl32/rebar.c	7 Oct 2003 03:30:47 -0000	1.78
+++ wine/dlls/comctl32/rebar.c	21 Oct 2003 18:11:25 -0000
@@ -3402,8 +3402,11 @@
 	}
 	if (lprbbi->lpText) {
             INT len = MultiByteToWideChar( CP_ACP, 0, lprbbi->lpText, -1, NULL, 0 );
-            lpBand->lpText = (LPWSTR)Alloc (len*sizeof(WCHAR));
-            MultiByteToWideChar( CP_ACP, 0, lprbbi->lpText, -1, lpBand->lpText, len );
+            if (len > 1)
+            {
+                lpBand->lpText = (LPWSTR)Alloc (len*sizeof(WCHAR));
+                MultiByteToWideChar( CP_ACP, 0, lprbbi->lpText, -1, lpBand->lpText, len );
+            }
 	}
     }
 
@@ -3447,8 +3450,11 @@
 	}
 	if (lprbbi->lpText) {
 	    INT len = lstrlenW (lprbbi->lpText);
-	    lpBand->lpText = (LPWSTR)Alloc ((len + 1)*sizeof(WCHAR));
-	    strcpyW (lpBand->lpText, lprbbi->lpText);
+	    if (len > 1)
+	    {
+	        lpBand->lpText = (LPWSTR)Alloc ((len + 1)*sizeof(WCHAR));
+	        strcpyW (lpBand->lpText, lprbbi->lpText);
+	    }
 	}
     }
 

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

  Powered by Linux