From: Paul Eggert Date: Sat, 18 Jun 2011 16:07:41 +0000 (-0700) Subject: * fns.c (Ffillarray): Use same idx as rest of code here. X-Git-Tag: emacs-pretest-24.0.90~104^2~473^2~54 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=436b4815ed0f616fba06a6ff3dfb44fade8b0321;p=emacs.git * fns.c (Ffillarray): Use same idx as rest of code here. --- diff --git a/src/fns.c b/src/fns.c index 702ecbd7c63..32d96fbc94e 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2169,13 +2169,12 @@ ARRAY is a vector, string, char-table, or bool-vector. */) unsigned char str[MAX_MULTIBYTE_LENGTH]; int len = CHAR_STRING (charval, str); EMACS_INT size_byte = SBYTES (array); - EMACS_INT i; if (INT_MULTIPLY_OVERFLOW (SCHARS (array), len) || SCHARS (array) * len != size_byte) error ("Attempt to change byte length of a string"); - for (i = 0; i < size_byte; i++) - *p++ = str[i % len]; + for (idx = 0; idx < size_byte; idx++) + *p++ = str[idx % len]; } else for (idx = 0; idx < size; idx++)