Commit eac3d6d3c003405af2cd12591c1750d742124ee3

Sylvain 2022-10-04T10:46:42

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

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index d245f5f..139c550 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -413,7 +413,7 @@ SDL_VideoInit(const char *driver_name)
     SDL_bool init_keyboard = SDL_FALSE;
     SDL_bool init_mouse = SDL_FALSE;
     SDL_bool init_touch = SDL_FALSE;
-    int i;
+    int i = 0;
 
     /* Check to make sure we don't overwrite '_this' */
     if (_this != NULL) {