diff options
author | Ken Raeburn <raeburn@raeburn.org> | 2005-12-06 07:40:47 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@raeburn.org> | 2005-12-06 07:40:47 +0000 |
commit | 88fde92a48ab3e79ee91e0db62f775c28c77fa95 (patch) | |
tree | 7ac93e37f60d49d041cebce55b033808e0ac20c4 /src/undo.c | |
parent | 7723a3e52b00e7db534d576b5e3701a9defe63c4 (diff) | |
download | emacs-88fde92a48ab3e79ee91e0db62f775c28c77fa95.tar.gz |
(truncate_undo_list): Avoid dangerous side effects in NILP argument.
Diffstat (limited to 'src/undo.c')
-rw-r--r-- | src/undo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/undo.c b/src/undo.c index 9839906ca7e..ecbb714fddd 100644 --- a/src/undo.c +++ b/src/undo.c @@ -378,11 +378,11 @@ truncate_undo_list (b) && size_so_far > XINT (Vundo_outer_limit) && !NILP (Vundo_outer_limit_function)) { - Lisp_Object temp = last_undo_buffer; + Lisp_Object temp = last_undo_buffer, tem; /* Normally the function this calls is undo-outer-limit-truncate. */ - if (! NILP (call1 (Vundo_outer_limit_function, - make_number (size_so_far)))) + tem = call1 (Vundo_outer_limit_function, make_number (size_so_far)); + if (! NILP (tem)) { /* The function is responsible for making any desired changes in buffer-undo-list. */ |