According to John F. Fay:
authorNigel Stewart <nigels.com@gmail.com>
Wed, 3 Mar 2004 03:35:42 +0000 (03:35 +0000)
committerNigel Stewart <nigels.com@gmail.com>
Wed, 3 Mar 2004 03:35:42 +0000 (03:35 +0000)
The variable "num_axes" should be "joy->num_axes".

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@469 7f0cb862-5218-0410-a997-914c9d46530a

src/freeglut_joystick.c

index 6bdccf5..042563f 100644 (file)
@@ -738,7 +738,7 @@ static void fghJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
 
             if ( buttons != NULL ) *buttons = joy->tmp_buttons;
             if ( axes    != NULL )
-                memcpy ( axes, joy->tmp_axes, sizeof(float) * num_axes );
+                memcpy ( axes, joy->tmp_axes, sizeof(float) * joy->num_axes );
 
             return;
         }