summaryrefslogtreecommitdiffstats
path: root/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-11-26 22:28:24 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-11-26 22:28:24 +0000
commit8cb410c63cbec58dc736e160ffe88a67af46e4c9 (patch)
tree557c8cea9558af595265778be29a851a4afd4c28 /status.c
parentba5404d93e40e61176ffb150b66ddc3b349603a7 (diff)
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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/status.c b/status.c
index 3ab7a90e..fa452d53 100644
--- a/status.c
+++ b/status.c
@@ -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;
}