diff src/unicode.c @ 4688:7e54adf407a1

Fix a bug with Unicode error sequences and very short input strings. src/ChangeLog addition: 2009-09-11 Aidan Kehoe <kehoea@parhasard.net> * unicode.c (unicode_convert): Fix a bug with error sequences and very short input strings. tests/ChangeLog addition: 2009-09-11 Aidan Kehoe <kehoea@parhasard.net> * automated/mule-tests.el (featurep): Check that a Unicode bug with very short inputs has been fixed.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 11 Sep 2009 17:54:07 +0100
parents 2669b1b7e33b
children 257b468bf2ca
line wrap: on
line diff
--- a/src/unicode.c	Sun Sep 06 23:47:12 2009 +0100
+++ b/src/unicode.c	Fri Sep 11 17:54:07 2009 +0100
@@ -2221,7 +2221,7 @@
 
 	}
 
-      if (str->eof && ch)
+      if (str->eof && counter)
         {
           switch (type)
             {
@@ -2277,6 +2277,7 @@
               break;
             }
           ch = 0;
+          counter = 0;
         }
 
       data->counter = counter;