Skip to content

Commit

Permalink
playsound: fix potention null pointer read
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr authored and icculus committed Oct 13, 2023
1 parent 253b00c commit 1507be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/playsound.c
Expand Up @@ -839,7 +839,7 @@ int main(int argc, char **argv)
global_state.predecode = 1;
} /* else if */

else if (SDL_strcmp(argv[i], "--loop") == 0)
else if (SDL_strcmp(argv[i], "--loop") == 0 && argc > i + 1)
{
global_state.looping = SDL_atoi(argv[++i]);
} /* else if */
Expand Down

0 comments on commit 1507be9

Please sign in to comment.