Fix text replacement warning

Using strncpy to cut off copying a terminating NUL yields a gcc
warning.  Just use memcpy instead.
This commit is contained in:
Dean Luick
2021-01-17 14:12:58 -06:00
parent 5dc5ece412
commit f63d435c6d
4 changed files with 5 additions and 5 deletions

View File

@@ -171,7 +171,7 @@ register struct obj *pen;
nm += 3;
if ((bp = strstri(nm, " armour")) != 0) {
(void) strncpy(bp, " armor ", 7); /* won't add '\0' */
memcpy(bp, " armor ", 7);
(void) mungspaces(bp + 1); /* remove the extra space */
}