[ros-diffs] [gschneider] 36617: After entering a case on iEncoding for ANSI/UTF, iEncoding can only have those two values. Fixes Coverity CIDS 19, 20.

gschneider at svn.reactos.org gschneider at svn.reactos.org
Wed Oct 1 21:56:51 CEST 2008


Author: gschneider
Date: Wed Oct  1 14:56:51 2008
New Revision: 36617

URL: http://svn.reactos.org/svn/reactos?rev=36617&view=rev
Log:
After entering a case on iEncoding for ANSI/UTF, iEncoding can only have those two values. Fixes Coverity CIDS 19, 20.

Modified:
    trunk/reactos/base/applications/notepad/text.c

Modified: trunk/reactos/base/applications/notepad/text.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/text.c?rev=36617&r1=36616&r2=36617&view=diff
==============================================================================
--- trunk/reactos/base/applications/notepad/text.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/text.c [iso-8859-1] Wed Oct  1 14:56:51 2008
@@ -120,8 +120,6 @@
 			iCodePage = CP_ACP;
 		else if (iEncoding == ENCODING_UTF8)
 			iCodePage = CP_UTF8;
-		else
-			goto done;
 
 		if ((dwSize - dwPos) > 0)
 		{
@@ -263,8 +261,6 @@
 					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)



More information about the Ros-diffs mailing list