From 5a38b8c5ed3769ae8e6d5383a20c75ac717e9414 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 21 Aug 2002 02:28:21 +0000 Subject: [PATCH] (base64_decode_1): Insert eight-bit chars correctly. --- src/fns.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fns.c b/src/fns.c index 5133f32a5dc..2a442816405 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3263,8 +3263,8 @@ base64_decode_1 (from, to, length, multibyte, nchars_return) 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 @@ base64_decode_1 (from, to, length, multibyte, nchars_return) 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 @@ base64_decode_1 (from, to, length, multibyte, nchars_return) 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++; -- 2.39.5