소스 검색

testautomation_events: initialize variable to prevent undefined read

Sylvain 1 주 전
부모
커밋
b084999d40
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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);