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:
@@ -58,8 +58,8 @@ static struct attribute attr;
|
|||||||
*/
|
*/
|
||||||
void custom_init_attr(void)
|
void custom_init_attr(void)
|
||||||
{
|
{
|
||||||
short col_fg;
|
short col_fg, dummy;
|
||||||
pair_content(COLR_CUSTOM, &col_fg, NULL);
|
pair_content(COLR_CUSTOM, &col_fg, &dummy);
|
||||||
|
|
||||||
attr.color[ATTR_HIGHEST] =
|
attr.color[ATTR_HIGHEST] =
|
||||||
(col_fg == -1 || col_fg == 255) ?
|
(col_fg == -1 || col_fg == 255) ?
|
||||||
|
|||||||
Reference in New Issue
Block a user