Resolved snwprintf() issues once and for all. Thanks to cousteau, dorp, and kate in irc.freenode.net/##c.

This commit is contained in:
Pietro Gagliardi 2015-04-11 13:32:25 -04:00
parent 4611ebf27c
commit 348998bdbe
2 changed files with 2 additions and 4 deletions

View File

@ -40,9 +40,7 @@ static const char *loadLastError(const char *message)
wmessage = toUTF16(message); wmessage = toUTF16(message);
n = _scwprintf(initErrorFormat, initErrorArgs); n = _scwprintf(initErrorFormat, initErrorArgs);
wstr = (WCHAR *) uiAlloc((n + 1) * sizeof (WCHAR), "WCHAR[]"); wstr = (WCHAR *) uiAlloc((n + 1) * sizeof (WCHAR), "WCHAR[]");
// TODO this requires -lmsvcr100; find out if that runs on XP RTM/SP1 snwprintf(wstr, n + 1, initErrorFormat, initErrorArgs);
// TODO find replacement
swprintf_s(wstr, n + 1, initErrorFormat, initErrorArgs);
str = toUTF8(wstr); str = toUTF8(wstr);
uiFree(wstr); uiFree(wstr);
if (hassysmsg) if (hassysmsg)

View File

@ -1,7 +1,7 @@
// 6 april 2015 // 6 april 2015
#include "uipriv_windows.h" #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) static void uimsgloop_else(MSG *msg)
{ {