瀏覽代碼

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);