diff options
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r-- | usr.bin/tmux/status.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 6b979a054f5..5cfb8d8fbb8 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.52 2009/11/26 21:37:13 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.53 2009/11/26 22:28:24 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -882,6 +882,7 @@ status_prompt_key(struct client *c, int key) { struct paste_buffer *pb; char *s, *first, *last, word[64], swapc; + u_char ch; size_t size, n, off, idx; size = strlen(c->prompt_buffer); @@ -1023,7 +1024,8 @@ status_prompt_key(struct client *c, int key) if ((pb = paste_get_top(&c->session->buffers)) == NULL) break; for (n = 0; n < pb->size; n++) { - if (pb->data[n] < 32 || pb->data[n] == 127) + ch = (u_char) pb->data[n]; + if (ch < 32 || ch == 127) break; } |