changeset 20712:50255c536f0f

(mapcar1): Keep `i' in `i_before' before `i' is incremented by FETCH_STRING_CHAR_ADVANCE.
author Kenichi Handa <handa@m17n.org>
date Thu, 22 Jan 1998 01:26:45 +0000
parents 9ab8e061c0bf
children bab57112b50e
files src/fns.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Thu Jan 22 01:26:45 1998 +0000
+++ b/src/fns.c	Thu Jan 22 01:26:45 1998 +0000
@@ -1995,9 +1995,11 @@
       for (i = 0, i_byte = 0; i < leni;)
 	{
 	  int c;
-	  FETCH_STRING_CHAR_ADVANCE (c, seq, i, i_byte)
+	  int i_before = i;
+
+	  FETCH_STRING_CHAR_ADVANCE (c, seq, i, i_byte);
 	  XSETFASTINT (dummy, c);
-	  vals[i] = call1 (fn, dummy);
+	  vals[i_before] = call1 (fn, dummy);
 	}
     }
   else   /* Must be a list, since Flength did not get an error */