From 622d4def2283e6fdc13dae33d8814e2af5169a65 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 8 Jan 2009 22:28:02 +0000 Subject: 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. --- status.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'status.c') diff --git a/status.c b/status.c index 675e284a..9b9e1801 100644 --- a/status.c +++ b/status.c @@ -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 @@ -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'; -- cgit