Make sure tstring can store wchar_t. This currently blocks anyone from writing unit tests for strlist.cpp because the tests are not Unicode yet!
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6806 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
9c598cafff
commit
0f2a6027e9
1 changed files with 3 additions and 0 deletions
|
@ -32,6 +32,9 @@ bool StrSetUTF16LE(tstring&dest, const void*src)
|
|||
if (!cec.Initialize(-1,NStreamEncoding::UTF16LE)) return false;
|
||||
src = (const void*) cec.Convert(src);
|
||||
if (!src) return false;
|
||||
#endif
|
||||
#ifdef C_ASSERT
|
||||
C_ASSERT(sizeof(tstring::value_type) >= sizeof(wchar_t));
|
||||
#endif
|
||||
try { dest = (wchar_t*) src; } catch(...) { return false; }
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue