diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-09-28 22:47:22 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-09-28 22:47:22 +0000 |
commit | aafee17de62d21f5cd5ced9a798a89c39bb8a70a (patch) | |
tree | 0f883f4683c033ae13e57ac8caf22d024b2d9c40 /server-msg.c | |
parent | d2e035f892ac8b21889e0124157a9be4f94462d3 (diff) |
New input parser via state machine.
Diffstat (limited to 'server-msg.c')
-rw-r--r-- | server-msg.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server-msg.c b/server-msg.c index 9ec5ecbb..6ec36e8e 100644 --- a/server-msg.c +++ b/server-msg.c @@ -1,4 +1,4 @@ -/* $Id: server-msg.c,v 1.7 2007-09-28 21:41:52 mxey Exp $ */ +/* $Id: server-msg.c,v 1.8 2007-09-28 22:47:21 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -389,14 +389,13 @@ server_msg_fn_rename(struct hdr *hdr, struct client *c) char *cause; struct window *w; struct session *s; - if (hdr->size != sizeof data) fatalx("bad MSG_RENAME size"); buffer_read(c->in, &data, hdr->size); - data.newname[sizeof data.newname] = '\0'; + data.newname[(sizeof data.newname) - 1] = '\0'; if ((s = server_find_sessid(&data.sid, &cause)) == NULL) { /* XXX: Send message to client */ |