Commit e7522695 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(Fmsdos_set_mouse_buttons): Signal an error if the

argument is outside the range [2..3].
parent eccd9c9b
......@@ -195,8 +195,15 @@ them. This happens with wheeled mice on Windows 9X, for example.")
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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment