From 348998bdbe8e29c3c2dff11a94ea1230695bbbf2 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 11 Apr 2015 13:32:25 -0400 Subject: [PATCH] Resolved snwprintf() issues once and for all. Thanks to cousteau, dorp, and kate in irc.freenode.net/##c. --- init_windows.c | 4 +--- main_windows.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/init_windows.c b/init_windows.c index ed0bf6aa..7ebe4e21 100644 --- a/init_windows.c +++ b/init_windows.c @@ -40,9 +40,7 @@ static const char *loadLastError(const char *message) wmessage = toUTF16(message); n = _scwprintf(initErrorFormat, initErrorArgs); wstr = (WCHAR *) uiAlloc((n + 1) * sizeof (WCHAR), "WCHAR[]"); - // TODO this requires -lmsvcr100; find out if that runs on XP RTM/SP1 - // TODO find replacement - swprintf_s(wstr, n + 1, initErrorFormat, initErrorArgs); + snwprintf(wstr, n + 1, initErrorFormat, initErrorArgs); str = toUTF8(wstr); uiFree(wstr); if (hassysmsg) diff --git a/main_windows.c b/main_windows.c index 0b6b4076..bd973b72 100644 --- a/main_windows.c +++ b/main_windows.c @@ -1,7 +1,7 @@ // 6 april 2015 #include "uipriv_windows.h" -// #qo LDFLAGS: -luser32 -lkernel32 -lgdi32 -luxtheme -lmsimg32 -lcomdlg32 -lole32 -loleaut32 -loleacc -luuid -lmsvcr100 +// #qo LDFLAGS: -luser32 -lkernel32 -lgdi32 -luxtheme -lmsimg32 -lcomdlg32 -lole32 -loleaut32 -loleacc -luuid static void uimsgloop_else(MSG *msg) {