aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-01-16 19:17:31 +0000
committerThomas Adam <thomas@xteddy.org>2015-01-16 19:17:31 +0000
commitdf6488a47088ec8bcddc6a1cfa85fec1a462c789 (patch)
treecf1bbe106963c4f0201a2edc24f8bc416f74c0ca /screen.c
parent66e8811c64a833b759511b3f7309e834155a8442 (diff)
parent776eef49d8e13b227d25e5d56d4c379b89c4aacb (diff)
downloadrtmux-df6488a47088ec8bcddc6a1cfa85fec1a462c789.tar.gz
rtmux-df6488a47088ec8bcddc6a1cfa85fec1a462c789.tar.bz2
rtmux-df6488a47088ec8bcddc6a1cfa85fec1a462c789.zip
Merge branch 'obsd-master'
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("");