Fixes: debbugs:11141

* w32menu.c (is_simple_dialog): Properly check lisp types.
This commit is contained in:
Andreas Schwab 2012-04-01 18:42:57 +02:00
parent d6ec6cb42b
commit 3b0512a3d5
2 changed files with 17 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
* w32menu.c (is_simple_dialog): Properly check lisp types.
(Bug#11141)
2012-03-31 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (move_it_by_lines): When DVPOS is positive, and the

View file

@ -1173,18 +1173,23 @@ w32_dialog_show (FRAME_PTR f, int keymaps,
static int
is_simple_dialog (Lisp_Object contents)
{
Lisp_Object options = XCDR (contents);
Lisp_Object options;
Lisp_Object name, yes, no, other;
if (!CONSP (contents))
return 0;
options = XCDR (contents);
yes = build_string ("Yes");
no = build_string ("No");
if (!CONSP (options))
return 0;
name = XCAR (XCAR (options));
if (!CONSP (options))
name = XCAR (options);
if (!CONSP (name))
return 0;
name = XCAR (name);
if (!NILP (Fstring_equal (name, yes)))
other = no;
@ -1197,7 +1202,10 @@ is_simple_dialog (Lisp_Object contents)
if (!CONSP (options))
return 0;
name = XCAR (XCAR (options));
name = XCAR (options);
if (!CONSP (name))
return 0;
name = XCAR (name);
if (NILP (Fstring_equal (name, other)))
return 0;