diff options
| author | Paul Eggert | 2011-06-18 09:07:41 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-18 09:07:41 -0700 |
| commit | 436b4815ed0f616fba06a6ff3dfb44fade8b0321 (patch) | |
| tree | 319e29ee5fb5f4e7025c0a6202c8085a794b2268 /src | |
| parent | a4cf38e4bad869b1dc6af9c0b61b3e06da157dd3 (diff) | |
| download | emacs-436b4815ed0f616fba06a6ff3dfb44fade8b0321.tar.gz emacs-436b4815ed0f616fba06a6ff3dfb44fade8b0321.zip | |
* fns.c (Ffillarray): Use same idx as rest of code here.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -2169,13 +2169,12 @@ ARRAY is a vector, string, char-table, or bool-vector. */) | |||
| 2169 | unsigned char str[MAX_MULTIBYTE_LENGTH]; | 2169 | unsigned char str[MAX_MULTIBYTE_LENGTH]; |
| 2170 | int len = CHAR_STRING (charval, str); | 2170 | int len = CHAR_STRING (charval, str); |
| 2171 | EMACS_INT size_byte = SBYTES (array); | 2171 | EMACS_INT size_byte = SBYTES (array); |
| 2172 | EMACS_INT i; | ||
| 2173 | 2172 | ||
| 2174 | if (INT_MULTIPLY_OVERFLOW (SCHARS (array), len) | 2173 | if (INT_MULTIPLY_OVERFLOW (SCHARS (array), len) |
| 2175 | || SCHARS (array) * len != size_byte) | 2174 | || SCHARS (array) * len != size_byte) |
| 2176 | error ("Attempt to change byte length of a string"); | 2175 | error ("Attempt to change byte length of a string"); |
| 2177 | for (i = 0; i < size_byte; i++) | 2176 | for (idx = 0; idx < size_byte; idx++) |
| 2178 | *p++ = str[i % len]; | 2177 | *p++ = str[idx % len]; |
| 2179 | } | 2178 | } |
| 2180 | else | 2179 | else |
| 2181 | for (idx = 0; idx < size; idx++) | 2180 | for (idx = 0; idx < size; idx++) |