diff src/joystick/SDL_joystick.c @ 716:f25e3334d583

SDL_JoystickInit: If malloc() fails, pretend no joysticks were detected.
author Ryan C. Gordon <icculus@icculus.org>
date Sat, 13 Sep 2003 02:20:32 +0000
parents f6ffac90895c
children b8d311d90021
line wrap: on
line diff
--- a/src/joystick/SDL_joystick.c	Fri Sep 05 15:20:47 2003 +0000
+++ b/src/joystick/SDL_joystick.c	Sat Sep 13 02:20:32 2003 +0000
@@ -63,8 +63,8 @@
 			SDL_numjoysticks = 0;
 		} else {
 			memset(SDL_joysticks, 0, arraylen);
+			SDL_numjoysticks = status;
 		}
-		SDL_numjoysticks = status;
 		status = 0;
 	}
 	default_joystick = NULL;