diff options
| author | Kenichi Handa | 1998-01-22 01:26:45 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-01-22 01:26:45 +0000 |
| commit | 0ab6a3d89628513c77248a90ecff1e72a044773d (patch) | |
| tree | 9fccf4ec8454307ab8de7741d56e9ea691ff6c97 | |
| parent | 6589fd67a7c1f278315fc84df2475460ac3bd45e (diff) | |
| download | emacs-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -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 */ |