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.
This commit is contained in:
parent
b9ce73c745
commit
6f1b80ead5
@ -4977,7 +4977,7 @@ int search_results(char *str, int votes)
|
|||||||
}
|
}
|
||||||
else if (!strncmp(str, "MOTD ", 5))
|
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))
|
else if (!strncmp(str, "TAG ", 4))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user