From b95a85f898da7edffec09895effb72034ccb8fab Mon Sep 17 00:00:00 2001 From: Gregor Schneider Date: Wed, 1 Oct 2008 19:56:51 +0000 Subject: [PATCH] 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 --- reactos/base/applications/notepad/text.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/reactos/base/applications/notepad/text.c b/reactos/base/applications/notepad/text.c index 768cd6aa4e2..be58d730e9e 100644 --- a/reactos/base/applications/notepad/text.c +++ b/reactos/base/applications/notepad/text.c @@ -120,8 +120,6 @@ BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding iCodePage = CP_ACP; else if (iEncoding == ENCODING_UTF8) iCodePage = CP_UTF8; - else - goto done; if ((dwSize - dwPos) > 0) { @@ -263,8 +261,6 @@ static BOOL WriteEncodedText(HANDLE hFile, LPCWSTR pszText, DWORD dwTextLen, int iCodePage = CP_ACP; else if (iEncoding == ENCODING_UTF8) iCodePage = CP_UTF8; - else - goto done; iRequiredBytes = WideCharToMultiByte(iCodePage, 0, &pszText[dwPos], dwTextLen - dwPos, NULL, 0, NULL, NULL); if (iRequiredBytes <= 0)