aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Love2000-09-25 09:23:53 +0000
committerDave Love2000-09-25 09:23:53 +0000
commit844eb643e45887a54d5ad5edd6ced1de0b82e5ab (patch)
tree14f754d2c299c28cd409c794c267c2808aa8fb0e /src
parent2e636f9d4814c7da977ab8581ab5e8b6b994d903 (diff)
downloademacs-844eb643e45887a54d5ad5edd6ced1de0b82e5ab.tar.gz
emacs-844eb643e45887a54d5ad5edd6ced1de0b82e5ab.zip
(base64_encode_1): Fix last change.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/fns.c14
2 files changed, 13 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 97235b593ec..da4dc9c21c5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12000-09-24 Dave Love <fx@gnu.org>
2
3 * fns.c (base64_encode_1): Fix last change.
4
12000-09-22 Gerd Moellmann <gerd@gnu.org> 52000-09-22 Gerd Moellmann <gerd@gnu.org>
2 6
3 * dispnew.c (enable_glyph_matrix_rows): Remove xasserts. 7 * dispnew.c (enable_glyph_matrix_rows): Remove xasserts.
diff --git a/src/fns.c b/src/fns.c
index e46159fd63c..fce3d728a3a 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -3377,7 +3377,7 @@ base64_encode_1 (from, to, length, line_break, multibyte)
3377{ 3377{
3378 int counter = 0, i = 0; 3378 int counter = 0, i = 0;
3379 char *e = to; 3379 char *e = to;
3380 unsigned char c; 3380 int c;
3381 unsigned int value; 3381 unsigned int value;
3382 int bytes; 3382 int bytes;
3383 3383
@@ -3386,9 +3386,9 @@ base64_encode_1 (from, to, length, line_break, multibyte)
3386 if (multibyte) 3386 if (multibyte)
3387 { 3387 {
3388 c = STRING_CHAR_AND_LENGTH (from + i, length - i, bytes); 3388 c = STRING_CHAR_AND_LENGTH (from + i, length - i, bytes);
3389 if (!SINGLE_BYTE_CHAR_P (c)) 3389 if (bytes > 1)
3390 return -1; 3390 return -1;
3391 i += bytes; 3391 i++;
3392 } 3392 }
3393 else 3393 else
3394 c = from[i++]; 3394 c = from[i++];
@@ -3424,7 +3424,9 @@ base64_encode_1 (from, to, length, line_break, multibyte)
3424 if (multibyte) 3424 if (multibyte)
3425 { 3425 {
3426 c = STRING_CHAR_AND_LENGTH (from + i, length - i, bytes); 3426 c = STRING_CHAR_AND_LENGTH (from + i, length - i, bytes);
3427 i += bytes; 3427 if (bytes > 1)
3428 return -1;
3429 i++;
3428 } 3430 }
3429 else 3431 else
3430 c = from[i++]; 3432 c = from[i++];
@@ -3444,7 +3446,9 @@ base64_encode_1 (from, to, length, line_break, multibyte)
3444 if (multibyte) 3446 if (multibyte)
3445 { 3447 {
3446 c = STRING_CHAR_AND_LENGTH (from + i, length - i, bytes); 3448 c = STRING_CHAR_AND_LENGTH (from + i, length - i, bytes);
3447 i += bytes; 3449 if (bytes > 1)
3450 return -1;
3451 i++;
3448 } 3452 }
3449 else 3453 else
3450 c = from[i++]; 3454 c = from[i++];