Ver Fonte

testautomation_events: initialize variable to prevent undefined read

Sylvain há 1 semana atrás
pai
commit
b084999d40
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      test/testautomation_events.c

+ 1 - 0
test/testautomation_events.c

@@ -230,6 +230,7 @@ static int SDLCALL IncrementCounterThread(void *userdata)
     SDL_Event event;
 
     SDL_assert(!SDL_IsMainThread());
+    SDL_zero(event);
 
     if (data->delay > 0) {
         SDL_Delay(data->delay);