diff src/mule-canna.c @ 116:9f59509498e1 r20-1b10

Import from CVS: tag r20-1b10
author cvs
date Mon, 13 Aug 2007 09:23:06 +0200
parents 8619ce7e4c50
children e121b013d1f0
line wrap: on
line diff
--- a/src/mule-canna.c	Mon Aug 13 09:21:56 2007 +0200
+++ b/src/mule-canna.c	Mon Aug 13 09:23:06 2007 +0200
@@ -1589,6 +1589,7 @@
 }	
 
 /* return the MULE internal string length of EUC string */
+/* Modified by sb to return a character count not byte count. */
 static int
 mule_strlen (unsigned char *p, int l)
 {
@@ -1599,17 +1600,17 @@
     {
       if ((unsigned char) ch == ISO_CODE_SS2)
 	{
-	  len += 2;
+	  len++;
 	  cp += 2;
 	}
       else if ((unsigned char) ch == ISO_CODE_SS3)
 	{
-	  len += 3;
+	  len++;
 	  cp += 3;
 	}
       else if (ch & 0x80)
 	{
-	  len += 3;
+	  len++;
 	  cp += 2;
 	}
       else