char *s = shk_your(outbuf, obj); /* assert( s == outbuf ); */
int space_left = BUFSZ - strlen(s) - sizeof " ";
- return strncat(strcat(s, " "), xname(obj), space_left);
+ /* "your corpse" is silly, use corpse_xname for this case */
+ return strncat(strcat(s, " "),
+ (obj->otyp == CORPSE) ?
+ corpse_xname(obj, FALSE) : xname(obj), space_left);
}
/* capitalized variant of yname() */
cant_take:
pline("%s tries to %s your %s but gives up.",
Monnam(mtmp), how[rn2(SIZE(how))],
- (otmp->owornmask & W_ARMOR) ? equipname(otmp) : xname(otmp));
+ (otmp->owornmask & W_ARMOR) ? equipname(otmp) :
+ (otmp->otyp == CORPSE) ? corpse_xname(otmp, FALSE) :
+ xname(otmp));
/* the fewer items you have, the less likely the thief
is going to stick around to try again (0) instead of
running away (1) */