From 291c7558777c2bccac24eb11228d55c91f44794b Mon Sep 17 00:00:00 2001 From: GloriousEggroll Date: Sun, 16 Feb 2020 22:14:01 -0700 Subject: [PATCH] woops. forgot i made a revert --- steam_helper/steam.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp index 43932d1c9..7fd29a36c 100644 --- a/steam_helper/steam.cpp +++ b/steam_helper/steam.cpp @@ -33,6 +33,8 @@ * Windows version of Steam running. */ #include +#include +#include #pragma push_macro("_WIN32") #pragma push_macro("__cdecl") @@ -42,7 +44,6 @@ #pragma pop_macro("_WIN32") #pragma pop_macro("__cdecl") -#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(steam); @@ -118,7 +119,7 @@ static void setup_steam_registry(void) static WCHAR *find_quote(WCHAR *str) { - WCHAR *end = strchrW(str, '"'), *ch; + WCHAR *end = wcschr(str, '"'), *ch; int odd; while (end) { @@ -131,7 +132,7 @@ static WCHAR *find_quote(WCHAR *str) } if (!odd) return end; - end = strchrW(end + 1, '"'); + end = wcschr(end + 1, '"'); } return NULL; } @@ -156,7 +157,7 @@ static HANDLE run_process(void) } else { - cmdline = strchrW(cmdline, ' '); + cmdline = wcschr(cmdline, ' '); } if (!cmdline) { @@ -195,9 +196,9 @@ static HANDLE run_process(void) else { start = cmdline; - end = strchrW(start, ' '); + end = wcschr(start, ' '); if (!end) - end = strchrW(start, '\0'); + end = wcschr(start, '\0'); remainder = end; } @@ -234,11 +235,11 @@ static HANDLE run_process(void) flags |= CREATE_NEW_CONSOLE; new_cmdline = (WCHAR *)HeapAlloc(GetProcessHeap(), 0, - (strlenW(dos) + 3 + strlenW(remainder) + 1) * sizeof(WCHAR)); - strcpyW(new_cmdline, dquoteW); - strcatW(new_cmdline, dos); - strcatW(new_cmdline, dquoteW); - strcatW(new_cmdline, remainder); + (lstrlenW(dos) + 3 + lstrlenW(remainder) + 1) * sizeof(WCHAR)); + lstrcpyW(new_cmdline, dquoteW); + lstrcatW(new_cmdline, dos); + lstrcatW(new_cmdline, dquoteW); + lstrcatW(new_cmdline, remainder); cmdline = new_cmdline; }