summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slstatus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/slstatus.c b/slstatus.c
index e38b963..70d8fbb 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -260,7 +260,7 @@ hostname(void)
fgets(hostname, sizeof(hostname), fp);
/* FIXME: needs improvement */
- memset(&hostname[strlen(hostname)-1], '\0',
+ memset(&hostname[strlen(hostname)], '\0',
sizeof(hostname) - strlen(hostname));
fclose(fp);