Use dummy variables to ignore return values of pair_content()

This prevents from segmentation faults with recent ncurses
implementations. See commit 5722d2e (Fix segmentation fault when
changing colors, 2017-07-28) for details.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer 2018-05-10 14:05:04 +02:00
parent 01142891a7
commit 1418e40793

View File

@ -58,8 +58,8 @@ static struct attribute attr;
*/
void custom_init_attr(void)
{
short col_fg;
pair_content(COLR_CUSTOM, &col_fg, NULL);
short col_fg, dummy;
pair_content(COLR_CUSTOM, &col_fg, &dummy);
attr.color[ATTR_HIGHEST] =
(col_fg == -1 || col_fg == 255) ?