From fd05d07c2b7bafcfb371f96baae96dc636a5aabf Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 10 Jan 2009 14:43:43 +0000 Subject: Change server-info format. --- tmux.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tmux.c') diff --git a/tmux.c b/tmux.c index 1d92f1af..02016d57 100644 --- a/tmux.c +++ b/tmux.c @@ -1,4 +1,4 @@ -/* $Id: tmux.c,v 1.88 2009-01-10 01:51:22 nicm Exp $ */ +/* $Id: tmux.c,v 1.89 2009-01-10 14:43:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -356,14 +356,16 @@ main(int argc, char **argv) fatalx("bad MSG_PRINT size"); log_info("%.*s", (int) hdr.size, BUFFER_OUT(cctx.srv_in)); - buffer_remove(cctx.srv_in, hdr.size); + if (hdr.size != 0) + buffer_remove(cctx.srv_in, hdr.size); goto restart; case MSG_ERROR: if (hdr.size > INT_MAX - 1) fatalx("bad MSG_ERROR size"); log_warnx("%.*s", (int) hdr.size, BUFFER_OUT(cctx.srv_in)); - buffer_remove(cctx.srv_in, hdr.size); + if (hdr.size != 0) + buffer_remove(cctx.srv_in, hdr.size); n = 1; goto out; case MSG_READY: -- cgit