aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2018-02-18 14:23:05 -0800
committerMichael Forney <mforney@mforney.org>2018-02-18 14:23:05 -0800
commitf33585c7fd4057d10e42868b183993e7b3ee045f (patch)
tree9be5fd79194596689f62e1b2a680992aab92a441 /vis.c
parent5963289d0257c7bd422c3cf54866a846168f5c7a (diff)
downloadvis-f33585c7fd4057d10e42868b183993e7b3ee045f.tar.gz
vis-f33585c7fd4057d10e42868b183993e7b3ee045f.tar.xz
Support COLOR_PAIRS > SHRT_MAX
In ncurses 6.1, the TERMINAL structure was updated[0] to store data in `int` instead of `short`, and terminfo definitions for 256-color terminals were updated from `pairs#32767` to `pairs#0x10000`. However, since vis stores the value of COLOR_PAIRS in a short (ncurses internally stores it as an int), it is now overflowing into negative, breaking color support completely. The standard `init_pair` entry points still use `short` for their parameters, so just restrict the pairs to `SHRT_MAX` during allocation. [0] http://invisible-island.net/ncurses/announce-6.1.html#h4-new-library
Diffstat (limited to 'vis.c')
0 files changed, 0 insertions, 0 deletions