diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-08 22:28:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-08 22:28:02 +0000 |
commit | 622d4def2283e6fdc13dae33d8814e2af5169a65 (patch) | |
tree | ac4a0bc015e6001521350d2e1c239e4eaed5f032 /status.c | |
parent | 678dffa840870a332b1c9136964ed4422e4d414d (diff) | |
download | rtmux-622d4def2283e6fdc13dae33d8814e2af5169a65.tar.gz rtmux-622d4def2283e6fdc13dae33d8814e2af5169a65.tar.bz2 rtmux-622d4def2283e6fdc13dae33d8814e2af5169a65.zip |
Give up the farce of caring about any keys aside from the ones in the screen termcap and the ones termcap doesn't handle that we hardcode manually.
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: status.c,v 1.56 2009-01-07 22:29:33 nicm Exp $ */ +/* $Id: status.c,v 1.57 2009-01-08 22:28:02 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -522,7 +522,8 @@ status_prompt_key(struct client *c, int key) last--; if (*last != '\0') last++; - if (last <= first || last - first > (sizeof word) - 1) + if (last <= first || + ((size_t) (last - first)) > (sizeof word) - 1) break; memcpy(word, first, last - first); word[last - first] = '\0'; |