Fix string truncation warnings (Wstringop-truncation) (#53)

This commit is contained in:
Kevin Fischer
2018-07-15 16:23:26 -05:00
committed by wyld-sw
parent ad88f94a46
commit 14855c273a
5 changed files with 16 additions and 8 deletions

View File

@@ -169,9 +169,9 @@ ACMD(do_ban)
CREATE(ban_node, struct ban_list_element, 1);
strncpy(ban_node->site, site, BANNED_SITE_LENGTH); /* strncpy: OK (b_n->site:BANNED_SITE_LENGTH+1) */
ban_node->site[BANNED_SITE_LENGTH] = '\0';
for (nextchar = ban_node->site; *nextchar; nextchar++)
*nextchar = LOWER(*nextchar);
ban_node->site[BANNED_SITE_LENGTH] = '\0';
strncpy(ban_node->name, GET_NAME(ch), MAX_NAME_LENGTH); /* strncpy: OK (b_n->size:MAX_NAME_LENGTH+1) */
ban_node->name[MAX_NAME_LENGTH] = '\0';
ban_node->date = time(0);