use typed var since short is what is used for storing color pairs, calling pair_content with anything else should be undefined behaviour, thus, only initializing up to color_pairs_max should be acceptable I think this makes a little more sense then using the defined constants
1 files changed, 1 insertions(+), 1 deletions(-) M vt.c
M vt.c => vt.c +1 -1
@@ 1833,7 1833,7 @@ static void init_colors(void) * 0 and 0. Initialize all color-pairs in order to have consistent * behaviour despite the implementation used. */ for (short i = 1; i < MIN(COLOR_PAIRS, SHRT_MAX); i++) for (short i = 1; i < color_pairs_max; i++) init_pair(i, 0, 0); vt_color_reserve(COLOR_WHITE, COLOR_BLACK); }