Mercurial > emacs
changeset 34561:62530d6f561d
(Fmsdos_set_mouse_buttons): Signal an error if the
argument is outside the range [2..3].
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Thu, 14 Dec 2000 15:12:58 +0000 |
parents | df3a9e4e055c |
children | cac4e3129cc3 |
files | src/msdos.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/msdos.c Thu Dec 14 14:21:32 2000 +0000 +++ b/src/msdos.c Thu Dec 14 15:12:58 2000 +0000 @@ -195,8 +195,15 @@ (nbuttons) Lisp_Object nbuttons; { + int n; + CHECK_NUMBER (nbuttons, 0); - mouse_setup_buttons (XINT (nbuttons)); + n = XINT (nbuttons); + if (n < 2 || n > 3) + Fsignal (Qargs_out_of_range, + Fcons (build_string ("only 2 or 3 mouse buttons are supported"), + Fcons (nbuttons, Qnil))); + mouse_setup_buttons (n); return Qnil; }