more dupstr (trunk only)

This commit is contained in:
nethack.rankin
2012-03-10 02:49:08 +00:00
parent 78127038a0
commit d3c59c9e84
6 changed files with 14 additions and 27 deletions

View File

@@ -1383,11 +1383,8 @@ struct monst *mtmp2, *mtmp1;
if (!mtmp2->mextra) mtmp2->mextra = newmextra();
if (MNAME(mtmp1)) {
int lth = strlen(MNAME(mtmp1)) + 1;
if (lth) {
new_mname(mtmp2, lth);
Strcpy(MNAME(mtmp2), MNAME(mtmp1));
}
new_mname(mtmp2, (int)strlen(MNAME(mtmp1)) + 1);
Strcpy(MNAME(mtmp2), MNAME(mtmp1));
}
if (EGD(mtmp1)) {
if (!EGD(mtmp2)) newegd(mtmp2);