fixed bug #1098 so test-code works on ubuntu now

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6545 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2014-10-05 21:52:03 +00:00
parent 6fb77d0a16
commit 14fcfbe1a8
3 changed files with 16 additions and 6 deletions

View file

@ -196,7 +196,7 @@ int wsprintf(TCHAR *s, const TCHAR *format, ...) {
return res;
}
static char g_nrt_iconv_narrowlocbuf[50], *g_nrt_iconv_narrowloc;
static char g_nrt_iconv_narrowlocbuf[50], *g_nrt_iconv_narrowloc = 0;
#define setlocale_ACP(cat) setlocale((cat), "")
#define iconv_ACP g_nrt_iconv_narrowloc
#define setlocale_OEM(cat) NSISRT_setlocale_wincp((cat), 1252)
@ -453,6 +453,7 @@ bool nsis_iconv_reallociconv(iconv_t CD, char**In, size_t*cbInLeft, char**Mem, s
const unsigned short CODEPAGESTR_MAXLEN = 50; // Should be plenty
void create_code_page_string(TCHAR *buf, size_t len, UINT code_page)
{
if (!g_nrt_iconv_narrowloc) NSISRT_Initialize(); // For winchar.cpp unit test
switch(code_page)
{
case CP_ACP: _sntprintf(buf, len, _T("%") NPRINs, iconv_ACP); return;