瀏覽代碼

Fixed warning: 'fA' may be used uninitialized in this function

Sam Lantinga 1 年之前
父節點
當前提交
2cf32b0e0a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/render/SDL_render.c

+ 1 - 1
src/render/SDL_render.c

@@ -1744,7 +1744,7 @@ int SDL_SetTextureAlphaModFloat(SDL_Texture *texture, float alpha)
 
 int SDL_GetTextureAlphaMod(SDL_Texture *texture, Uint8 *alpha)
 {
-    float fA;
+    float fA = 1.0f;
 
     if (SDL_GetTextureAlphaModFloat(texture, &fA) < 0) {
         return -1;