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:
@@ -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 */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user