[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690
Alexandre Julliard
julliard at winehq.org
Sun Jun 17 20:03:18 UTC 2012
The following commit has been merged in the wheezy branch:
commit c62bee49af1bd72a4d1eaba9de3f6d4265f74e91
Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date: Fri Apr 13 22:45:22 2012 +0900
comctl32: Truncate the info tip text when using ANSI version messages.
(cherry picked from commit 8cedea0d60f567b68531be06efc4f0a21ad8b516)
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index 1d758b4..d1e57a3 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -171,6 +171,8 @@ typedef struct
#define ICON_HEIGHT 16
#define ICON_WIDTH 16
+#define MAX_TEXT_SIZE_A 80 /* maximum retriving text size by ANSI message */
+
static LRESULT CALLBACK
TOOLTIPS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uId, DWORD_PTR dwRef);
@@ -954,8 +956,9 @@ TOOLTIPS_CopyInfoT (const TTTOOL_INFO *toolPtr, TTTOOLINFOW *ti, BOOL isW)
else if (isW)
strcpyW (ti->lpszText, toolPtr->lpszText);
else
+ /* ANSI version, the buffer is maximum 80 bytes without null. */
WideCharToMultiByte(CP_ACP, 0, toolPtr->lpszText, -1,
- (LPSTR)ti->lpszText, INFOTIPSIZE, NULL, NULL);
+ (LPSTR)ti->lpszText, MAX_TEXT_SIZE_A, NULL, NULL);
}
}
@@ -1341,12 +1344,13 @@ TOOLTIPS_GetTextT (const TOOLTIPS_INFO *infoPtr, TTTOOLINFOW *ti, BOOL isW)
/* NB this API is broken, there is no way for the app to determine
what size buffer it requires nor a way to specify how long the
- one it supplies is. We'll assume it's up to INFOTIPSIZE */
+ one it supplies is. According to the test result, it's up to
+ 80 bytes by the ANSI version. */
buffer[0] = '\0';
TOOLTIPS_GetTipText(infoPtr, nTool, buffer);
WideCharToMultiByte(CP_ACP, 0, buffer, -1, (LPSTR)ti->lpszText,
- INFOTIPSIZE, NULL, NULL);
+ MAX_TEXT_SIZE_A, NULL, NULL);
}
return 0;
--
Debian Wine packaging
More information about the pkg-wine-party
mailing list