Strcpy(heldmon, "an unseen creature");
}
if (u.uswallow) { /* implies u.ustuck is non-Null */
- Sprintf(buf, "%s by %s",
+ Snprintf(buf, sizeof buf, "%s by %s",
is_animal(u.ustuck->data) ? "swallowed" : "engulfed",
heldmon);
if (dmgtype(u.ustuck->data, AD_DGST)) {
boolean ustick = (Upolyd && sticks(g.youmonst.data));
int dx = u.ustuck->mx - u.ux, dy = u.ustuck->my - u.uy;
- Sprintf(buf, "%s %s (%s)", ustick ? "holding" : "held by",
- heldmon, dxdy_to_dist_descr(dx, dy, TRUE));
+ Snprintf(buf, sizeof buf, "%s %s (%s)",
+ ustick ? "holding" : "held by",
+ heldmon, dxdy_to_dist_descr(dx, dy, TRUE));
you_are(buf, "");
}
if (Riding) {
/* hero is held by a monster or engulfed or holding a monster and has zapped
opening/unlocking magic at holder/engulfer/holdee or at self */
void
-release_hold()
+release_hold(void)
{
struct monst *mtmp = u.ustuck;