[Commits] SDL: haiku: Fixed crash on quit if max number of joysticks was c...

libsdl.org revision control commits-owner at libsdl.org
Sun May 7 12:10:21 PDT 2017


details:   https://hg.libsdl.org/SDL/rev/50ffb2b7ee1c
changeset: 10994:50ffb2b7ee1c
user:      Philipp Wiesemann <philipp.wiesemann at arcor.de>
date:      Sun May 07 21:02:46 2017 +0200
description:
haiku: Fixed crash on quit if max number of joysticks was connected.

diffstat:

 src/joystick/haiku/SDL_haikujoystick.cc |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 0283fa2192cd -r 50ffb2b7ee1c src/joystick/haiku/SDL_haikujoystick.cc
--- a/src/joystick/haiku/SDL_haikujoystick.cc	Sun May 07 21:02:31 2017 +0200
+++ b/src/joystick/haiku/SDL_haikujoystick.cc	Sun May 07 21:02:46 2017 +0200
@@ -228,12 +228,12 @@
     {
         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;


More information about the commits mailing list