src/joystick/haiku/SDL_haikujoystick.cc
changeset 10994 50ffb2b7ee1c
parent 10753 220a81177cfb
child 11164 3862687cef22
     1.1 --- a/src/joystick/haiku/SDL_haikujoystick.cc	Sun May 07 21:02:31 2017 +0200
     1.2 +++ b/src/joystick/haiku/SDL_haikujoystick.cc	Sun May 07 21:02:46 2017 +0200
     1.3 @@ -228,12 +228,12 @@
     1.4      {
     1.5          int i;
     1.6  
     1.7 -        for (i = 0; SDL_joyport[i]; ++i) {
     1.8 +        for (i = 0; i < SDL_SYS_numjoysticks; ++i) {
     1.9              SDL_free(SDL_joyport[i]);
    1.10          }
    1.11          SDL_joyport[0] = NULL;
    1.12  
    1.13 -        for (i = 0; SDL_joyname[i]; ++i) {
    1.14 +        for (i = 0; i < SDL_SYS_numjoysticks; ++i) {
    1.15              SDL_free(SDL_joyname[i]);
    1.16          }
    1.17          SDL_joyname[0] = NULL;