From 8cb410c63cbec58dc736e160ffe88a67af46e4c9 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 26 Nov 2009 22:28:24 +0000 Subject: Tidy up various bits of the paste code, make the data buffer char * and add comments. --- status.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'status.c') 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; } -- cgit