1
0
forked from aniani/vim

patch 8.2.4468: Coverity warns for uninitialized struct member

Problem:    Coverity warns for uninitialized struct member.
Solution:   Set color.index to zero.
This commit is contained in:
Bram Moolenaar
2022-02-25 20:48:26 +00:00
parent 0e71b7d4ce
commit 68afde4c9b
2 changed files with 3 additions and 0 deletions

View File

@@ -4193,6 +4193,7 @@ set_vterm_palette(VTerm *vterm, long_u *rgb)
color.red = (unsigned)(rgb[index] >> 16);
color.green = (unsigned)(rgb[index] >> 8) & 255;
color.blue = (unsigned)rgb[index] & 255;
color.index = 0;
vterm_state_set_palette_color(state, index, &color);
}
}