Explorar o código

SDL_test: fix infinite loop when passing invalid argument

Anonymous Maarten %!s(int64=2) %!d(string=hai) anos
pai
achega
774e51627e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/test/SDL_test_common.c

+ 1 - 1
src/test/SDL_test_common.c

@@ -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;
         }