Check return value, not unsigned "supported" flags

This commit is contained in:
Sam Lantinga 2011-12-31 13:28:07 -05:00
parent 028e5dcdbd
commit 75ecf04ad9

View file

@ -426,7 +426,7 @@ SDL_SYS_HapticOpenFromService(SDL_Haptic * haptic, io_service_t service)
/* Get supported features. */
ret2 = GetSupportedFeatures(haptic);
if (haptic->supported < 0) {
if (ret2 < 0) {
goto open_err;
}