Use int not u_char for colours from options since they may have bit 8

set to mark them as 256-colour. Reported by Chris Johnson.
This commit is contained in:
Nicholas Marriott 2012-04-29 07:33:41 +00:00
parent ff5155f719
commit e60f48ab09

View File

@ -81,7 +81,7 @@ status_redraw_get_left(struct client *c,
{ {
struct session *s = c->session; struct session *s = c->session;
char *left; char *left;
u_char fg, bg, attr; int fg, bg, attr;
size_t leftlen; size_t leftlen;
fg = options_get_number(&s->options, "status-left-fg"); fg = options_get_number(&s->options, "status-left-fg");
@ -111,7 +111,7 @@ status_redraw_get_right(struct client *c,
{ {
struct session *s = c->session; struct session *s = c->session;
char *right; char *right;
u_char fg, bg, attr; int fg, bg, attr;
size_t rightlen; size_t rightlen;
fg = options_get_number(&s->options, "status-right-fg"); fg = options_get_number(&s->options, "status-right-fg");
@ -683,7 +683,7 @@ status_print(
struct session *s = c->session; struct session *s = c->session;
const char *fmt; const char *fmt;
char *text; char *text;
u_char fg, bg, attr; int fg, bg, attr;
fg = options_get_number(oo, "window-status-fg"); fg = options_get_number(oo, "window-status-fg");
if (fg != 8) if (fg != 8)