diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-11-26 22:28:24 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-11-26 22:28:24 +0000 |
commit | 8cb410c63cbec58dc736e160ffe88a67af46e4c9 (patch) | |
tree | 557c8cea9558af595265778be29a851a4afd4c28 /status.c | |
parent | ba5404d93e40e61176ffb150b66ddc3b349603a7 (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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } |