aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1998-10-14 07:17:22 +0000
committerKenichi Handa1998-10-14 07:17:22 +0000
commit95b8aba74b18f5bcfc1410e3cd653b50c37ae301 (patch)
treebea45e50c3f20bfccaa576b80ea05c7379cd263d /src
parent0cb0ba6c86cbffb5cd2f5df7f96a7ad848fd351c (diff)
downloademacs-95b8aba74b18f5bcfc1410e3cd653b50c37ae301.tar.gz
emacs-95b8aba74b18f5bcfc1410e3cd653b50c37ae301.zip
(Ffillarray): Fix previous change.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/fns.c b/src/fns.c
index 5414e991cfc..c802c5c803a 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1794,14 +1794,16 @@ ARRAY is a vector, string, char-table, or bool-vector.")
1794 int len = CHAR_STRING (charval, workbuf, str); 1794 int len = CHAR_STRING (charval, workbuf, str);
1795 int size_byte = STRING_BYTES (XSTRING (array)); 1795 int size_byte = STRING_BYTES (XSTRING (array));
1796 unsigned char *p1 = p, *endp = p + size_byte; 1796 unsigned char *p1 = p, *endp = p + size_byte;
1797 int this_len, i; 1797 int i;
1798 1798
1799 for (i = 0; i < size; i++) 1799 if (size != size_byte)
1800 { 1800 while (p1 < endp)
1801 this_len = MULTIBYTE_FORM_LENGTH (p1, endp - p1); 1801 {
1802 if (len != this_len) 1802 int this_len = MULTIBYTE_FORM_LENGTH (p1, endp - p1);
1803 error ("Attempt to change byte length of a string"); 1803 if (len != this_len)
1804 } 1804 error ("Attempt to change byte length of a string");
1805 p1 += this_len;
1806 }
1805 for (i = 0; i < size_byte; i++) 1807 for (i = 0; i < size_byte; i++)
1806 *p++ = str[i % len]; 1808 *p++ = str[i % len];
1807 } 1809 }