aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base/lib_color.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2000-01-26 16:43:25 +0000
committerPeter Wemm <peter@FreeBSD.org>2000-01-26 16:43:25 +0000
commit1759abf3ae1a38b7578df7996346544b66e508ad (patch)
tree506da7a5cf693bf8780ad013837cbd67913bedbb /contrib/ncurses/ncurses/base/lib_color.c
parent0e3d540892016a47f6a68ec9ba2879d35ce5f7c2 (diff)
downloadsrc-1759abf3ae1a38b7578df7996346544b66e508ad.tar.gz
src-1759abf3ae1a38b7578df7996346544b66e508ad.zip
Import ncurses-5.0-release to update the 5.0-prerelease that we had.vendor/ncurses/5.0
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=56639 svn path=/vendor/ncurses/5.0/; revision=56641; tag=vendor/ncurses/5.0
Diffstat (limited to 'contrib/ncurses/ncurses/base/lib_color.c')
-rw-r--r--contrib/ncurses/ncurses/base/lib_color.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/ncurses/ncurses/base/lib_color.c b/contrib/ncurses/ncurses/base/lib_color.c
index cdc943adc6ee..297a14c36d6e 100644
--- a/contrib/ncurses/ncurses/base/lib_color.c
+++ b/contrib/ncurses/ncurses/base/lib_color.c
@@ -41,7 +41,7 @@
#include <term.h>
-MODULE_ID("$Id: lib_color.c,v 1.35 1999/03/15 01:45:14 Alexander.V.Lukyanov Exp $")
+MODULE_ID("$Id: lib_color.c,v 1.36 1999/10/03 00:20:37 Philippe.Blain Exp $")
/*
* These should be screen structure members. They need to be globals for
@@ -345,7 +345,7 @@ bool has_colors(void)
int color_content(short color, short *r, short *g, short *b)
{
T((T_CALLED("color_content(%d,%p,%p,%p)"), color, r, g, b));
- if (color < 0 || color > COLORS)
+ if (color < 0 || color >= COLORS)
returnCode(ERR);
if (r) *r = SP->_color_table[color].red;
@@ -358,7 +358,7 @@ int pair_content(short pair, short *f, short *b)
{
T((T_CALLED("pair_content(%d,%p,%p)"), pair, f, b));
- if ((pair < 0) || (pair > COLOR_PAIRS))
+ if ((pair < 0) || (pair >= COLOR_PAIRS))
returnCode(ERR);
if (f) *f = ((SP->_color_pairs[pair] >> C_SHIFT) & C_MASK);
if (b) *b = (SP->_color_pairs[pair] & C_MASK);