File: 10_fix-joystick-crash.patch

package info (click to toggle)
fuse-emulator 1.0.0.1a%2Bdfsg1-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 9,568 kB
  • sloc: ansic: 67,895; sh: 10,265; perl: 3,386; makefile: 787; yacc: 227; lex: 139
file content (17 lines) | stat: -rw-r--r-- 781 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
From: Fredrick Meunier <fredm@spamcop.net>
Subject: Fix crash with joysticks with more than 10 buttons
Bug-Debian: http://bugs.debian.org/665640
Origin: upstream, http://fuse-emulator.svn.sourceforge.net/viewvc/fuse-emulator?view=revision&revision=4259
Index: fuse-emulator/ui/sdl/sdljoystick.c
===================================================================
--- fuse-emulator.orig/ui/sdl/sdljoystick.c
+++ fuse-emulator/ui/sdl/sdljoystick.c
@@ -111,7 +111,7 @@ button_action( SDL_JoyButtonEvent *butto
   input_event_t event;
   
   button = buttonevent->button;
-  if( button > 10 ) return;	/* We support 'only' 10 fire buttons */
+  if( button > 9 ) return;	/* We support 'only' 10 fire buttons */
 
   event.type = type;
   event.types.joystick.which = buttonevent->which;