mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
Check standard error code return values as < 0 instead of == -1
This commit is contained in:
@@ -93,7 +93,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* Load the wave file into memory */
|
||||
if (SDL_LoadWAV(filename, &wave.spec, &wave.sound, &wave.soundlen) == -1) {
|
||||
if (SDL_LoadWAV(filename, &wave.spec, &wave.sound, &wave.soundlen) < 0) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", filename, SDL_GetError());
|
||||
SDL_free(filename);
|
||||
return SDL_APP_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user