dlls/comctl32/status.c
Ge van Geldorp
gvg at reactos.com
Thu Jan 13 03:09:18 CST 2005
Changelog:
Gunnar Dalsnes <hardon at online.no>
STATUSBAR_SetTextT:
- ntext wasn't freed on return if text was unicode
- part->text was allways freed, but if the previous style was SBT_OWNERDRAW,
part->text would contain 32bit data (not a buffer ptr.)
Index: dlls/comctl32/status.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/status.c,v
retrieving revision 1.69
diff -u -r1.69 status.c
--- dlls/comctl32/status.c 9 Jan 2005 16:42:54 -0000 1.69
+++ dlls/comctl32/status.c 13 Jan 2005 09:05:24 -0000
@@ -650,6 +650,7 @@
{
STATUSWINDOWPART *part=NULL;
BOOL changed = FALSE;
+ WORD oldStyle;
if (style & SBT_OWNERDRAW) {
TRACE("part %d, text %p\n",nPart,text);
@@ -671,6 +672,7 @@
if (part->style != style)
changed = TRUE;
+ oldStyle = part->style;
part->style = style;
if (style & SBT_OWNERDRAW) {
if (part->text == text)
@@ -694,7 +696,7 @@
/* check if text is unchanged -> no need to redraw */
if (text) {
if (!changed && part->text && !lstrcmpW(ntext, part->text)) {
- if (!isW) Free(ntext);
+ Free(ntext);
return TRUE;
}
} else {
@@ -702,7 +704,7 @@
return TRUE;
}
- if (part->text)
+ if (part->text && !(oldStyle & SBT_OWNERDRAW))
Free (part->text);
part->text = ntext;
}
More information about the wine-patches
mailing list