aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1998-01-22 01:26:45 +0000
committerKenichi Handa1998-01-22 01:26:45 +0000
commit0ab6a3d89628513c77248a90ecff1e72a044773d (patch)
tree9fccf4ec8454307ab8de7741d56e9ea691ff6c97
parent6589fd67a7c1f278315fc84df2475460ac3bd45e (diff)
downloademacs-0ab6a3d89628513c77248a90ecff1e72a044773d.tar.gz
emacs-0ab6a3d89628513c77248a90ecff1e72a044773d.zip
(mapcar1): Keep `i' in `i_before' before `i' is
incremented by FETCH_STRING_CHAR_ADVANCE.
-rw-r--r--src/fns.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fns.c b/src/fns.c
index dabd05ab2cf..421879fde9f 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1995,9 +1995,11 @@ mapcar1 (leni, vals, fn, seq)
1995 for (i = 0, i_byte = 0; i < leni;) 1995 for (i = 0, i_byte = 0; i < leni;)
1996 { 1996 {
1997 int c; 1997 int c;
1998 FETCH_STRING_CHAR_ADVANCE (c, seq, i, i_byte) 1998 int i_before = i;
1999
2000 FETCH_STRING_CHAR_ADVANCE (c, seq, i, i_byte);
1999 XSETFASTINT (dummy, c); 2001 XSETFASTINT (dummy, c);
2000 vals[i] = call1 (fn, dummy); 2002 vals[i_before] = call1 (fn, dummy);
2001 } 2003 }
2002 } 2004 }
2003 else /* Must be a list, since Flength did not get an error */ 2005 else /* Must be a list, since Flength did not get an error */