From 007997c4d4bf85ee6d020620fdece35432f075fe Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 21 Jun 2019 08:49:15 +0200 Subject: [PATCH] sti: Build with msvcrt. Signed-off-by: Alexandre Julliard --- dlls/sti/Makefile.in | 2 ++ dlls/sti/sti.c | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/sti/Makefile.in b/dlls/sti/Makefile.in index be3ac515eb2..884fdbd57eb 100644 --- a/dlls/sti/Makefile.in +++ b/dlls/sti/Makefile.in @@ -2,6 +2,8 @@ MODULE = sti.dll IMPORTLIB = sti IMPORTS = uuid ole32 oleaut32 rpcrt4 advapi32 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ sti.c \ sti_main.c diff --git a/dlls/sti/sti.c b/dlls/sti/sti.c index 41c94f57538..962371f92d2 100644 --- a/dlls/sti/sti.c +++ b/dlls/sti/sti.c @@ -29,7 +29,6 @@ #include "sti.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(sti); @@ -149,11 +148,11 @@ static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface, ret = RegCreateKeyW(HKEY_LOCAL_MACHINE, registeredAppsLaunchPath, ®isteredAppsKey); if (ret == ERROR_SUCCESS) { - WCHAR *value = HeapAlloc(GetProcessHeap(), 0, - (lstrlenW(pwszCommandLine) + 1 + lstrlenW(commandLineSuffix) + 1) * sizeof(WCHAR)); + size_t len = lstrlenW(pwszCommandLine) + 1 + lstrlenW(commandLineSuffix) + 1; + WCHAR *value = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); if (value) { - sprintfW(value, format, pwszCommandLine, commandLineSuffix); + swprintf(value, len, format, pwszCommandLine, commandLineSuffix); ret = RegSetValueExW(registeredAppsKey, pwszAppName, 0, REG_SZ, (BYTE*)value, (lstrlenW(value)+1)*sizeof(WCHAR)); if (ret != ERROR_SUCCESS)