summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2018-05-10 14:05:04 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2018-05-10 14:05:43 +0200
commit1418e40793931bb7c3212aaadc26c4fa4552a396 (patch)
treebf13989d54b7645c791fb4776c15ad2541429a16
parent01142891a735c84d9c4ae33fc8e4d46efd98fa12 (diff)
downloadcalcurse-1418e40793931bb7c3212aaadc26c4fa4552a396.tar.gz
calcurse-1418e40793931bb7c3212aaadc26c4fa4552a396.zip
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>
-rw-r--r--src/custom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/custom.c b/src/custom.c
index a7ded71..4005dc3 100644
--- a/src/custom.c
+++ b/src/custom.c
@@ -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) ?