Add some bounds checking.

2002-05-30  Jody Goldberg <jody@gnome.org>

	* gnome-settings-keyboard.c (xkb_set_keyboard_autorepeat_rate) : Add
	  some bounds checking.
This commit is contained in:
Jody Goldberg 2002-05-30 17:38:52 +00:00 committed by Jody Goldberg
parent e6ed3e6a01
commit cd185dae21
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2002-05-30 Jody Goldberg <jody@gnome.org>
* gnome-settings-keyboard.c (xkb_set_keyboard_autorepeat_rate) : Add
some bounds checking.
Wed May 29 20:23:13 2002 Jonathan Blandford <jrb@redhat.com>
* Makefile.am: Add gnome-settings-keybinding

View file

@ -71,8 +71,10 @@ xfree86_set_keyboard_autorepeat_rate (int delay, int rate)
static gboolean
xkb_set_keyboard_autorepeat_rate (int delay, int rate)
{
int interval = (rate <= 0) ? 1000000 : 1000/rate;
if (delay <= 0) delay = 1;
return XkbSetAutoRepeatRate (GDK_DISPLAY (), XkbUseCoreKbd,
delay, 1000/rate);
delay, interval);
}
#endif