mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-26 21:41:45 +01:00
Fix string truncation warnings (Wstringop-truncation) (#53)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user