[PATCH] comctl32/toolbar: Fix a TRACE

Mark Jansen mark.jansen at reactos.org
Mon Jan 29 15:12:44 CST 2018


Fix a TRACE that tries to print -1 as string.

-------------- next part --------------
From 30ea14e4b9258ff83d989a1c24fe8ac0dcf03e87 Mon Sep 17 00:00:00 2001
From: Mark Jansen <mark.jansen at reactos.org>
Date: Fri, 19 Jan 2018 23:56:41 +0100
Subject: comctl32/toolbar: Fix a TRACE

Signed-off-by: Mark Jansen <mark.jansen at reactos.org>
---
 dlls/comctl32/toolbar.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 8a035979d28..d1bf618b1ec 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -284,9 +284,11 @@ TOOLBAR_GetText(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *btnPtr)
 static void
 TOOLBAR_DumpTBButton(const TBBUTTON *tbb, BOOL fUnicode)
 {
+    static const WCHAR Undoc[1] = { 0 };
+    INT_PTR iString = tbb->iString != -1 ? tbb->iString : (INT_PTR)Undoc;
     TRACE("TBBUTTON: id %d, bitmap=%d, state=%02x, style=%02x, data=%08lx, stringid=0x%08lx (%s)\n",
           tbb->idCommand,tbb->iBitmap, tbb->fsState, tbb->fsStyle, tbb->dwData, tbb->iString,
-          (fUnicode ? wine_dbgstr_w((LPWSTR)tbb->iString) : wine_dbgstr_a((LPSTR)tbb->iString)));
+          (fUnicode ? wine_dbgstr_w((LPWSTR)iString) : wine_dbgstr_a((LPSTR)iString)));
 }
 
 static void
-- 
2.12.2.windows.1



More information about the wine-devel mailing list