From df6db90dd44984136d3724715fc2451d1b01fd23 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 21 Mar 2023 12:24:45 +0100 Subject: [PATCH] Fix sdltest_randomAsciiStringWithMaximumLength() where it requests a string a size 0 seen with: ./testautomation --seed MILAFAP2AKVP3V4G --filter sdltest_randomAsciiStringWithMaximumLength --- src/test/SDL_test_fuzzer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/SDL_test_fuzzer.c b/src/test/SDL_test_fuzzer.c index b59cbb32d..9e2e757e4 100644 --- a/src/test/SDL_test_fuzzer.c +++ b/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); }