From 5ea24c6218a322951f5da25f3f89f7669cdf87a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 21 Nov 2024 18:51:05 +0100 Subject: [PATCH] steam_helper: Use wcs instead of lstr functions. CW-Bug-Id: #24510 --- steam_helper/steam.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/steam_helper/steam.c b/steam_helper/steam.c index 3dfa3684..2adf2fcf 100644 --- a/steam_helper/steam.c +++ b/steam_helper/steam.c @@ -113,7 +113,7 @@ static char *escape_path_unix_to_dos( const char *path ) char *escaped = NULL; UINT len; - if (!(dos = wine_get_dos_file_name( path )) || !(len = lstrlenW( dos ))) goto done; + if (!(dos = wine_get_dos_file_name( path )) || !(len = wcslen( dos ))) goto done; if (!(tmp = heap_alloc( (len * 2 + 1) * sizeof(*tmp) ))) goto done; for (src = dos, dst = tmp; *src; src++, dst++) if ((*dst = *src) == '\\') *++dst = '\\'; @@ -397,11 +397,11 @@ static HANDLE run_process(BOOL *should_await, BOOL game_process) } new_cmdline = HeapAlloc(GetProcessHeap(), 0, - (lstrlenW(dos) + 3 + lstrlenW(remainder) + 1) * sizeof(WCHAR)); - lstrcpyW(new_cmdline, dquoteW); - lstrcatW(new_cmdline, dos); - lstrcatW(new_cmdline, dquoteW); - lstrcatW(new_cmdline, remainder); + (wcslen(dos) + 3 + wcslen(remainder) + 1) * sizeof(WCHAR)); + wcscpy(new_cmdline, dquoteW); + wcscat(new_cmdline, dos); + wcscat(new_cmdline, dquoteW); + wcscat(new_cmdline, remainder); cmdline = new_cmdline; } @@ -412,7 +412,7 @@ run: SetConsoleCtrlHandler( console_ctrl_handler, TRUE ); use_shell_execute = should_use_shell_execute(cmdline); - if (use_shell_execute && lstrlenW( cmdline ) > 10 && !memcmp( cmdline, L"link2ea://", 10 * sizeof(WCHAR) )) + if (use_shell_execute && wcslen( cmdline ) > 10 && !memcmp( cmdline, L"link2ea://", 10 * sizeof(WCHAR) )) { HDESK desktop = GetThreadDesktop(GetCurrentThreadId()); DWORD is_unavailable, type, size;