Skip to content

Commit

Permalink
Fix uninitialized variable in Image::fix_alpha_edges()
Browse files Browse the repository at this point in the history
`core\io\image.cpp:3776:33: error: 'closest_color[0]' may be used uninitialized [-Werror=maybe-uninitialized]`
  • Loading branch information
fire committed Oct 30, 2023
1 parent 9144457 commit 9877fa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/io/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9877fa5

Please sign in to comment.