فهرست منبع

haiku: Fixed crash on quit if max number of joysticks was connected.

Philipp Wiesemann 8 سال پیش
والد
کامیت
60f2848421
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/joystick/haiku/SDL_haikujoystick.cc

+ 2 - 2
src/joystick/haiku/SDL_haikujoystick.cc

@@ -228,12 +228,12 @@ extern "C"
     {
         int i;
 
-        for (i = 0; SDL_joyport[i]; ++i) {
+        for (i = 0; i < SDL_SYS_numjoysticks; ++i) {
             SDL_free(SDL_joyport[i]);
         }
         SDL_joyport[0] = NULL;
 
-        for (i = 0; SDL_joyname[i]; ++i) {
+        for (i = 0; i < SDL_SYS_numjoysticks; ++i) {
             SDL_free(SDL_joyname[i]);
         }
         SDL_joyname[0] = NULL;