changeset 89039:2383f41c7b8a

(base64_decode_1): Insert eight-bit chars correctly.
author Kenichi Handa <handa@m17n.org>
date Wed, 21 Aug 2002 02:28:21 +0000
parents f60ed671d6e4
children 1a28ef0dd9f4
files src/fns.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Wed Aug 21 02:27:07 2002 +0000
+++ b/src/fns.c	Wed Aug 21 02:28:21 2002 +0000
@@ -3263,8 +3263,8 @@
       value |= base64_char_to_value[c] << 12;
 
       c = (unsigned char) (value >> 16);
-      if (multibyte)
-	e += CHAR_STRING (c, e);
+      if (multibyte && c >= 128)
+	e += BYTE8_STRING (c, e);
       else
 	*e++ = c;
       nchars++;
@@ -3287,8 +3287,8 @@
       value |= base64_char_to_value[c] << 6;
 
       c = (unsigned char) (0xff & value >> 8);
-      if (multibyte)
-	e += CHAR_STRING (c, e);
+      if (multibyte && c >= 128)
+	e += BYTE8_STRING (c, e);
       else
 	*e++ = c;
       nchars++;
@@ -3305,8 +3305,8 @@
       value |= base64_char_to_value[c];
 
       c = (unsigned char) (0xff & value);
-      if (multibyte)
-	e += CHAR_STRING (c, e);
+      if (multibyte && c >= 128)
+	e += BYTE8_STRING (c, e);
       else
 	*e++ = c;
       nchars++;