Fix DupWCFromBytes/CharEncConv optimized return bug when converting UTF16LE license file to wchar_t(UTF16LE)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6414 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
e63fa6c53b
commit
bb9b88b70f
3 changed files with 13 additions and 11 deletions
|
@ -91,7 +91,8 @@ UINT StrLenUTF16(const void*str);
|
|||
bool StrSetUTF16LE(tstring&dest, const void*src);
|
||||
|
||||
UINT WCFromCodePoint(wchar_t*Dest,UINT cchDest,UINT32 CodPt);
|
||||
wchar_t* DupWCFromBytes(void*Buffer,UINT cbBuffer,WORD SrcCP);
|
||||
#define DWCFBF_ALLOWOPTIMIZEDRETURN 0x80000000 // DupWCFromBytes can return input Buffer
|
||||
wchar_t* DupWCFromBytes(void*Buffer,UINT cbBuffer,UINT32 SrcCP);
|
||||
UINT DetectUTFBOM(void*Buffer,UINT cb);
|
||||
UINT DetectUTFBOM(FILE*strm);
|
||||
WORD GetEncodingFromString(const TCHAR*s, bool&BOM);
|
||||
|
@ -110,7 +111,7 @@ protected:
|
|||
static bool IsWE(WORD Encoding) { return (WORD)-1 == Encoding; }
|
||||
static bool IsWE(UINT32 Encoding) { return (UINT32)-1 == Encoding; }
|
||||
public:
|
||||
CharEncConv() : m_Result(0) {}
|
||||
CharEncConv() : m_Result(0) { SetAllowOptimizedReturn(false); }
|
||||
~CharEncConv() { Close(); }
|
||||
void Close()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue