From e8ab80686a19be9202f9b885c6c8dddf1915abb4 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 1 Nov 2021 07:48:04 +0000 Subject: [PATCH] Fix a comparison, from Ben Boeckel, and a crash when opening completion menu, from Anindya Mukherjee. --- usr.bin/tmux/colour.c | 4 ++-- usr.bin/tmux/status.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/tmux/colour.c b/usr.bin/tmux/colour.c index 967333b2eb5..62ba1f83bbe 100644 --- a/usr.bin/tmux/colour.c +++ b/usr.bin/tmux/colour.c @@ -1,4 +1,4 @@ -/* $OpenBSD: colour.c,v 1.23 2021/10/25 21:21:16 nicm Exp $ */ +/* $OpenBSD: colour.c,v 1.24 2021/11/01 07:48:04 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -115,7 +115,7 @@ colour_force_rgb(int c) return (colour_256toRGB(c)); if (c >= 0 && c <= 7) return (colour_256toRGB(c)); - if (c >= 90 & c <= 97) + if (c >= 90 && c <= 97) return (colour_256toRGB(8 + c - 90)); return (-1); } diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 747e2742645..13bef13c221 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.229 2021/10/26 12:29:41 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.230 2021/11/01 07:48:04 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1727,7 +1727,7 @@ status_prompt_complete_list_menu(struct client *c, char **list, u_int size, item.name = list[i]; item.key = '0' + (i - spm->start); item.command = NULL; - menu_add_item(menu, &item, NULL, NULL, NULL); + menu_add_item(menu, &item, NULL, c, NULL); } if (options_get_number(c->session->options, "status-position") == 0) -- 2.20.1