From 7723a3e52b00e7db534d576b5e3701a9defe63c4 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 6 Dec 2005 07:39:57 +0000 Subject: [PATCH] (Fminibuffer_complete_and_exit): Avoid dangerous side effects in NILP argument. --- src/minibuf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/minibuf.c b/src/minibuf.c index e7df7bd0153..76529bf86e6 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -2116,16 +2116,17 @@ a repetition of this command will exit. */) () { register int i; - Lisp_Object val; + Lisp_Object val, tem; /* Allow user to specify null string */ if (XINT (Fminibuffer_prompt_end ()) == ZV) goto exit; val = Fminibuffer_contents (); - if (!NILP (Ftest_completion (val, - Vminibuffer_completion_table, - Vminibuffer_completion_predicate))) + tem = Ftest_completion (val, + Vminibuffer_completion_table, + Vminibuffer_completion_predicate); + if (!NILP (tem)) { if (completion_ignore_case) { /* Fixup case of the field, if necessary. */ -- 2.39.2