From 4fc0163853efae42e59f4bd90807aa3d2c971f2d Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 29 Aug 2017 18:16:38 -0400 Subject: [PATCH] test: Fix for negative int that was now a size_t (thanks, Ozkan!). Fixes Bugzilla #3787. --- test/testautomation_sdltest.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/testautomation_sdltest.c b/test/testautomation_sdltest.c index 1eb6f8887..399faf6de 100644 --- a/test/testautomation_sdltest.c +++ b/test/testautomation_sdltest.c @@ -35,6 +35,7 @@ sdltest_generateRunSeed(void *arg) { char* result; size_t i, l; + int j; for (i = 1; i <= 10; i += 3) { result = SDLTest_GenerateRunSeed((const int)i); @@ -48,8 +49,8 @@ sdltest_generateRunSeed(void *arg) } /* Negative cases */ - for (i = -2; i <= 0; i++) { - result = SDLTest_GenerateRunSeed((const int)i); + for (j = -2; j <= 0; i++) { + result = SDLTest_GenerateRunSeed((const int)j); SDLTest_AssertPass("Call to SDLTest_GenerateRunSeed()"); SDLTest_AssertCheck(result == NULL, "Verify returned value is not NULL"); }