浏览代码

Merge pull request #84173 from fire/initialize-colours

Fix uninitialized variable in `Image::fix_alpha_edges()`
Rémi Verschelde 2 年之前
父节点
当前提交
563e0eb534
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/io/image.cpp

+ 1 - 1
core/io/image.cpp

@@ -3773,7 +3773,7 @@ void Image::fix_alpha_edges() {
 			}
 
 			int closest_dist = max_dist;
-			uint8_t closest_color[3];
+			uint8_t closest_color[3] = { 0 };
 
 			int from_x = MAX(0, j - max_radius);
 			int to_x = MIN(width - 1, j + max_radius);