aboutsummaryrefslogtreecommitdiff
path: root/tmux.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-10 14:43:43 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-10 14:43:43 +0000
commitfd05d07c2b7bafcfb371f96baae96dc636a5aabf (patch)
tree302eeda9625ca65218a206ecdb0936ccb56ec4d6 /tmux.c
parenta49e9b5b00813669f521bf94f956775fa92fce4e (diff)
downloadrtmux-fd05d07c2b7bafcfb371f96baae96dc636a5aabf.tar.gz
rtmux-fd05d07c2b7bafcfb371f96baae96dc636a5aabf.tar.bz2
rtmux-fd05d07c2b7bafcfb371f96baae96dc636a5aabf.zip
Change server-info format.
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c8
1 files changed, 5 insertions, 3 deletions
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 <nicm@users.sourceforge.net>
@@ -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: