diff --git a/build/makefile_base.mak b/build/makefile_base.mak index 5ac0fefd..15409ece 100644 --- a/build/makefile_base.mak +++ b/build/makefile_base.mak @@ -1127,12 +1127,11 @@ $(STEAMEXE_CONFIGURE_FILES): $(STEAMEXE_SYN) $(MAKEFILE_DEP) | $(STEAMEXE_OBJ) $ -I"../$(TOOLS_DIR32)"/include/ \ -I"../$(TOOLS_DIR32)"/include/wine/ \ -I"../$(TOOLS_DIR32)"/include/wine/windows/ \ - -I"../$(TOOLS_DIR32)"/include/wine/msvcrt/ \ -I"../$(SRCDIR)"/lsteamclient/steamworks_sdk_142/ \ -L"../$(TOOLS_DIR32)"/lib/ \ -L"../$(TOOLS_DIR32)"/lib/wine/ \ -L"../$(SRCDIR)"/steam_helper/ \ - --guiexe ../$(STEAMEXE_SYN) && \ + --guiexe --nomsvcrt ../$(STEAMEXE_SYN) && \ cp ../$(STEAMEXE_SYN)/Makefile . && \ echo >> ./Makefile 'SRCDIR := ../$(STEAMEXE_SYN)' && \ echo >> ./Makefile 'vpath % $$(SRCDIR)' && \ diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp index 8e5b9777..9dcc8914 100644 --- a/steam_helper/steam.cpp +++ b/steam_helper/steam.cpp @@ -117,9 +117,20 @@ static void setup_steam_registry(void) SteamAPI_Shutdown(); } +static WCHAR *strchrW(WCHAR *h, WCHAR n) +{ + do + { + if(*h == n) + return h; + } while (*h++); + + return NULL; +} + static WCHAR *find_quote(WCHAR *str) { - WCHAR *end = wcschr(str, '"'), *ch; + WCHAR *end = strchrW(str, '"'), *ch; int odd; while (end) { @@ -132,7 +143,7 @@ static WCHAR *find_quote(WCHAR *str) } if (!odd) return end; - end = wcschr(end + 1, '"'); + end = strchrW(end + 1, '"'); } return NULL; } @@ -157,7 +168,7 @@ static HANDLE run_process(void) } else { - cmdline = wcschr(cmdline, ' '); + cmdline = strchrW(cmdline, ' '); } if (!cmdline) { @@ -196,9 +207,9 @@ static HANDLE run_process(void) else { start = cmdline; - end = wcschr(start, ' '); + end = strchrW(start, ' '); if (!end) - end = wcschr(start, '\0'); + end = strchrW(start, '\0'); remainder = end; }