mirror of
https://github.com/reactos/reactos.git
synced 2024-08-03 10:00:56 +00:00
After entering a case on iEncoding for ANSI/UTF, iEncoding can only have those two values. Fixes Coverity CIDS 19, 20.
svn path=/trunk/; revision=36617
This commit is contained in:
parent
0d10840784
commit
b95a85f898
|
@ -120,8 +120,6 @@ BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding
|
||||||
iCodePage = CP_ACP;
|
iCodePage = CP_ACP;
|
||||||
else if (iEncoding == ENCODING_UTF8)
|
else if (iEncoding == ENCODING_UTF8)
|
||||||
iCodePage = CP_UTF8;
|
iCodePage = CP_UTF8;
|
||||||
else
|
|
||||||
goto done;
|
|
||||||
|
|
||||||
if ((dwSize - dwPos) > 0)
|
if ((dwSize - dwPos) > 0)
|
||||||
{
|
{
|
||||||
|
@ -263,8 +261,6 @@ static BOOL WriteEncodedText(HANDLE hFile, LPCWSTR pszText, DWORD dwTextLen, int
|
||||||
iCodePage = CP_ACP;
|
iCodePage = CP_ACP;
|
||||||
else if (iEncoding == ENCODING_UTF8)
|
else if (iEncoding == ENCODING_UTF8)
|
||||||
iCodePage = CP_UTF8;
|
iCodePage = CP_UTF8;
|
||||||
else
|
|
||||||
goto done;
|
|
||||||
|
|
||||||
iRequiredBytes = WideCharToMultiByte(iCodePage, 0, &pszText[dwPos], dwTextLen - dwPos, NULL, 0, NULL, NULL);
|
iRequiredBytes = WideCharToMultiByte(iCodePage, 0, &pszText[dwPos], dwTextLen - dwPos, NULL, 0, NULL, NULL);
|
||||||
if (iRequiredBytes <= 0)
|
if (iRequiredBytes <= 0)
|
||||||
|
|
Loading…
Reference in a new issue