aboutsummaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-11-28 14:54:12 +0000
committerTiago Cunha <tcunha@gmx.com>2009-11-28 14:54:12 +0000
commitfabf40b3b3c9f37930aa99e40771a069a9c94adf (patch)
treef1aa668369ce2d47db3dae1390a057143d4136b7 /status.c
parent66bf2e2f040b9fc1a6f06f5076858c810b54b194 (diff)
downloadrtmux-fabf40b3b3c9f37930aa99e40771a069a9c94adf.tar.gz
rtmux-fabf40b3b3c9f37930aa99e40771a069a9c94adf.tar.bz2
rtmux-fabf40b3b3c9f37930aa99e40771a069a9c94adf.zip
Sync OpenBSD patchset 569:
Tidy up various bits of the paste code, make the data buffer char * and add comments.
Diffstat (limited to 'status.c')
-rw-r--r--status.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/status.c b/status.c
index fe8aa608..92df2f18 100644
--- a/status.c
+++ b/status.c
@@ -1,4 +1,4 @@
-/* $Id: status.c,v 1.137 2009-11-28 14:50:37 tcunha Exp $ */
+/* $Id: status.c,v 1.138 2009-11-28 14:54:12 tcunha 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;
}