Przeglądaj źródła

Fixed uninitialized variable in some cases

Sam Lantinga 11 lat temu
rodzic
commit
5c6c86912d
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/render/software/SDL_draw.h

+ 1 - 1
src/render/software/SDL_draw.h

@@ -51,7 +51,7 @@ do { \
 
 
 #define DRAW_SETPIXEL_BLEND(getpixel, setpixel) \
 #define DRAW_SETPIXEL_BLEND(getpixel, setpixel) \
 do { \
 do { \
-    unsigned sr, sg, sb, sa; \
+    unsigned sr, sg, sb, sa = 0xFF; \
     getpixel; \
     getpixel; \
     sr = DRAW_MUL(inva, sr) + r; \
     sr = DRAW_MUL(inva, sr) + r; \
     sg = DRAW_MUL(inva, sg) + g; \
     sg = DRAW_MUL(inva, sg) + g; \