summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2012-09-03 23:38:32 (GMT)
committer jacksonmj <mj-pt@jacksonmj.co.uk>2012-09-03 23:38:32 (GMT)
commit6f1b80ead59c78e89c38920ebfac06e285cb38cd (patch)
tree443208a91623d1f9d24d167a88936da178dcb121 /src/interface.c
parentb9ce73c7454368938ff593fce1c3e126e0e92eae (diff)
downloadpowder-6f1b80ead59c78e89c38920ebfac06e285cb38cd.zip
powder-6f1b80ead59c78e89c38920ebfac06e285cb38cd.tar.gz
Fix MOTD string copy
The missing terminating null character in the string copy meant that some of the previous message remained when the MOTD changed.
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c
index e2b1d0b..742272b 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -4977,7 +4977,7 @@ int search_results(char *str, int votes)
}
else if (!strncmp(str, "MOTD ", 5))
{
- memcpy(server_motd, str+5, strlen(str+5));
+ strncpy(server_motd, str+5, 511);
}
else if (!strncmp(str, "TAG ", 4))
{