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

@@ -172,12 +172,9 @@ new_omailcmd(otmp, response_cmd)
struct obj *otmp;
const char *response_cmd;
{
unsigned lth = strlen(response_cmd) + 1;
if (!otmp->oextra) otmp->oextra = newoextra();
if (OMAILCMD(otmp)) free_omailcmd(otmp);
OMAILCMD(otmp) = (char *)alloc(lth);
Strcpy(OMAILCMD(otmp), response_cmd);
OMAILCMD(otmp) = dupstr(response_cmd);
}
void