X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_color.c;h=409b66cab6a06a1e98558a95e600a693c2c41d9f;hp=41496eed612994b62c85a2d766ed4741b9f46af3;hb=cccf831ed7c83410c7f6cec2a43e71e9c4278b4c;hpb=9208e1bde56ebb9cc550fd93034f1d4650518b11 diff --git a/ncurses/base/lib_color.c b/ncurses/base/lib_color.c index 41496eed..409b66ca 100644 --- a/ncurses/base/lib_color.c +++ b/ncurses/base/lib_color.c @@ -48,7 +48,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_color.c,v 1.137 2018/03/01 15:02:12 tom Exp $") +MODULE_ID("$Id: lib_color.c,v 1.138 2018/05/16 08:24:08 tom Exp $") #ifdef USE_TERM_DRIVER #define CanChange InfoOf(SP_PARM).canchange @@ -938,9 +938,12 @@ _nc_pair_content(SCREEN *sp, int pair, int *f, int *b) if (!ValidPair(sp, pair)) { result = ERR; } else { - int fg = FORE_OF(sp->_color_pairs[pair]); - int bg = BACK_OF(sp->_color_pairs[pair]); + int fg; + int bg; + _nc_reserve_pairs(sp, pair); + fg = FORE_OF(sp->_color_pairs[pair]); + bg = BACK_OF(sp->_color_pairs[pair]); #if NCURSES_EXT_FUNCS if (isDefaultColor(fg)) fg = -1;