mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-17 18:28:28 +00:00
SDL_test: fix infinite loop when passing invalid argument
This commit is contained in:
parent
c52ad54b05
commit
774e51627e
1 changed files with 1 additions and 1 deletions
|
@ -659,7 +659,7 @@ SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **arg
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (i < argc) {
|
while (i < argc) {
|
||||||
const int consumed = SDLTest_CommonArg(state, i);
|
const int consumed = SDLTest_CommonArg(state, i);
|
||||||
if (consumed == 0) {
|
if (consumed <= 0) {
|
||||||
SDLTest_CommonLogUsage(state, argv[0], NULL);
|
SDLTest_CommonLogUsage(state, argv[0], NULL);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue