Browse Source

Fix sdltest_randomAsciiStringWithMaximumLength() where it requests a string a size 0
seen with: ./testautomation --seed MILAFAP2AKVP3V4G --filter sdltest_randomAsciiStringWithMaximumLength

Sylvain 2 years ago
parent
commit
a85cf62c12
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/test/SDL_test_fuzzer.c

+ 3 - 1
src/test/SDL_test_fuzzer.c

@@ -471,7 +471,9 @@ char *SDLTest_RandomAsciiStringWithMaximumLength(int maxLength)
     }
 
     size = (SDLTest_RandomUint32() % (maxLength + 1));
-
+    if (size == 0) {
+        size = 1;
+    }
     return SDLTest_RandomAsciiStringOfSize(size);
 }