notepad: Die if we get an unknown encoding name in load_encoding_name().

Francois Gouget fgouget at free.fr
Sun Sep 11 16:22:01 CDT 2011


This can only result from a programming error.
---

I don't know why the assert was disabled nor if this is the right fix. 
But just returning does not make sense as it would leave the buffer 
uninitialized and thus potentially not '\0' terminated.

 programs/notepad/dialog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/programs/notepad/dialog.c b/programs/notepad/dialog.c
index 94410bd..6ccb5ac 100644
--- a/programs/notepad/dialog.c
+++ b/programs/notepad/dialog.c
@@ -71,7 +71,7 @@ static void load_encoding_name(ENCODING enc, WCHAR* buffer, int length)
         }
 
         default:
-            assert(0 && "bad encoding in load_encoding_name");
+            assert("bad encoding in load_encoding_name");
             break;
     }
 }
-- 
1.7.5.4




More information about the wine-patches mailing list