diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2018-02-19 09:34:14 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2018-02-19 09:34:14 +0100 |
| commit | 70dd3140bbb664bba5852c0c3fe6bae92c484f7b (patch) | |
| tree | a974e6242d409e0a1fee553212e725e8fd514b56 | |
| parent | 4a3046f709342322aeca2394442579f39adae701 (diff) | |
| parent | f33585c7fd4057d10e42868b183993e7b3ee045f (diff) | |
| download | vis-70dd3140bbb664bba5852c0c3fe6bae92c484f7b.tar.gz vis-70dd3140bbb664bba5852c0c3fe6bae92c484f7b.tar.xz | |
Merge branch 'colors-6.1' of https://github.com/michaelforney/vis
| -rw-r--r-- | ui-terminal-curses.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-terminal-curses.c b/ui-terminal-curses.c index 744cbb4..59f5bc3 100644 --- a/ui-terminal-curses.c +++ b/ui-terminal-curses.c @@ -41,7 +41,7 @@ # define NCURSES_EXT_COLORS 0 # endif # if !NCURSES_EXT_COLORS -# define MAX_COLOR_PAIRS 256 +# define MAX_COLOR_PAIRS MIN(COLOR_PAIRS, 256) # endif #endif #ifndef MAX_COLOR_PAIRS @@ -179,7 +179,7 @@ static short color_pair_get(short fg, short bg) { if (default_bg == -1) default_bg = CELL_COLOR_BLACK; has_default_colors = (use_default_colors() == OK); - color_pairs_max = MIN(COLOR_PAIRS, MAX_COLOR_PAIRS); + color_pairs_max = MIN(MAX_COLOR_PAIRS, SHRT_MAX); if (COLORS) color2palette = calloc((COLORS + 2) * (COLORS + 2), sizeof(short)); } |
