SDL_test: fix infinite loop when passing invalid argument

This commit is contained in:
Anonymous Maarten authored and Anonymous Maarten committed 2023-03-17 17:54:16 +01:00
1 parent c52ad54b05
commit 774e51627e
1 file changed
+1 -1
+1 -1
View File
@@ -659,7 +659,7 @@ SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **arg
int i = 1;
while (i < argc) {
const int consumed = SDLTest_CommonArg(state, i);
if (consumed == 0) {
if (consumed <= 0) {
SDLTest_CommonLogUsage(state, argv[0], NULL);
return SDL_FALSE;
}