From 51ba036e6493b8f8893735ca840ea66d1a4fe608 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 27 May 2024 06:34:48 -0700 Subject: [PATCH] Verify that the timer callback is passed the correct parameters --- test/testtimer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/testtimer.c b/test/testtimer.c index eea9730c53..aeecb4df94 100644 --- a/test/testtimer.c +++ b/test/testtimer.c @@ -62,7 +62,9 @@ ticktock(Uint32 interval, void *param) static Uint32 SDLCALL callback(Uint32 interval, void *param) { - SDL_Log("Timer %" SDL_PRIu32 " : param = %d\n", interval, (int)(uintptr_t)param); + int value = (int)(uintptr_t)param; + SDL_assert( value == 1 || value == 2 || value == 3 ); + SDL_Log("Timer %" SDL_PRIu32 " : param = %d\n", interval, value); return interval; }