Fixed crash in joystick handling code. Newer 2.6 kernels add an additional 'resolution' field to input_absinfo. Note that we don't use that structure since we want to have enough space for the values even when building with an older kernel.
authorSam Lantinga <slouken@libsdl.org>
Thu, 17 Dec 2009 07:22:48 +0000
changeset 3590 493f252a455c
parent 3589 06f0768a904c
child 3591 db4af3cb938e
Fixed crash in joystick handling code. Newer 2.6 kernels add an additional 'resolution' field to input_absinfo. Note that we don't use that structure since we want to have enough space for the values even when building with an older kernel.
src/joystick/linux/SDL_sysjoystick.c
--- a/src/joystick/linux/SDL_sysjoystick.c	Thu Dec 17 06:08:20 2009 +0000
+++ b/src/joystick/linux/SDL_sysjoystick.c	Thu Dec 17 07:22:48 2009 +0000
@@ -701,7 +701,7 @@
                 continue;
             }
             if (test_bit(i, absbit)) {
-                int values[5];
+                int values[6];
 
                 if (ioctl(fd, EVIOCGABS(i), values) < 0)
                     continue;