aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2015-01-25 20:31:22 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2015-01-25 20:31:22 +0000
commit51233d8b2a8509405856439f11e7a60d08da8335 (patch)
treed02084aa6aa33ef415f343e809eefb1326613b13 /screen.c
parent68429cd0d3ebfa0a721814b097f03d95d532580c (diff)
parentdf6488a47088ec8bcddc6a1cfa85fec1a462c789 (diff)
downloadrtmux-51233d8b2a8509405856439f11e7a60d08da8335.tar.gz
rtmux-51233d8b2a8509405856439f11e7a60d08da8335.tar.bz2
rtmux-51233d8b2a8509405856439f11e7a60d08da8335.zip
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/screen.c b/screen.c
index 5b543eef..c1df95ad 100644
--- a/screen.c
+++ b/screen.c
@@ -32,11 +32,11 @@ void screen_resize_y(struct screen *, u_int);
void
screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
{
- char host[HOST_NAME_MAX];
+ char host[HOST_NAME_MAX+1];
s->grid = grid_create(sx, sy, hlimit);
- if (gethostname(host, HOST_NAME_MAX) == 0)
+ if (gethostname(host, sizeof(host)) == 0)
s->title = xstrdup(host);
else
s->title = xstrdup("");