瀏覽代碼

SDL_video.c: fix variable 'i' may be uninitialized when used here "_this->name = bootstrap[i]->name;"

Sylvain 4 年之前
父節點
當前提交
eac3d6d3c0
共有 1 個文件被更改,包括 1 次插入 和 1 次删除
  1. 1 1
      src/video/SDL_video.c

+ 1 - 1
src/video/SDL_video.c

@@ -413,7 +413,7 @@ SDL_VideoInit(const char *driver_name)
     SDL_bool init_keyboard = SDL_FALSE;
     SDL_bool init_keyboard = SDL_FALSE;
     SDL_bool init_mouse = SDL_FALSE;
     SDL_bool init_mouse = SDL_FALSE;
     SDL_bool init_touch = SDL_FALSE;
     SDL_bool init_touch = SDL_FALSE;
-    int i;
+    int i = 0;
 
 
     /* Check to make sure we don't overwrite '_this' */
     /* Check to make sure we don't overwrite '_this' */
     if (_this != NULL) {
     if (_this != NULL) {