Check standard error code return values as < 0 instead of == -1
This commit is contained in:
@@ -185,7 +185,7 @@ int main(int argc, char **argv)
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Don't see any specific audio playback devices!");
|
||||
} else {
|
||||
/* Load the wave file into memory */
|
||||
if (SDL_LoadWAV(filename, &spec, &sound, &soundlen) == -1) {
|
||||
if (SDL_LoadWAV(filename, &spec, &sound, &soundlen) < 0) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", filename,
|
||||
SDL_GetError());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user