Jacek Caban : winemac: Don't use sprintfW in copy_system_cursor_name.
Alexandre Julliard
julliard at winehq.org
Fri Jun 3 15:53:07 CDT 2022
Module: wine
Branch: master
Commit: 22342300d915cd3516307f13d2207e77025f1cbe
URL: https://source.winehq.org/git/wine.git/?a=commit;h=22342300d915cd3516307f13d2207e77025f1cbe
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Jun 3 00:25:09 2022 +0200
winemac: Don't use sprintfW in copy_system_cursor_name.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
---
dlls/winemac.drv/mouse.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/winemac.drv/mouse.c b/dlls/winemac.drv/mouse.c
index 00ec9a36c38..18a98296a76 100644
--- a/dlls/winemac.drv/mouse.c
+++ b/dlls/winemac.drv/mouse.c
@@ -166,7 +166,6 @@ static void send_mouse_input(HWND hwnd, macdrv_window cocoa_window, UINT flags,
*/
CFStringRef copy_system_cursor_name(ICONINFOEXW *info)
{
- static const WCHAR idW[] = {'%','h','u',0};
const struct system_cursors *cursors;
unsigned int i;
CFStringRef cursor_name = NULL;
@@ -184,7 +183,12 @@ CFStringRef copy_system_cursor_name(ICONINFOEXW *info)
p = name + strlenW(name);
*p++ = ',';
if (info->szResName[0]) strcpyW(p, info->szResName);
- else sprintfW(p, idW, info->wResID);
+ else
+ {
+ char buf[16];
+ sprintf(buf, "%hu", info->wResID);
+ asciiz_to_unicode(p, buf);
+ }
/* @@ Wine registry key: HKCU\Software\Wine\Mac Driver\Cursors */
if (!(key = open_hkcu_key("Software\\Wine\\Mac Driver\\Cursors")))
More information about the wine-cvs
mailing list