fix gremlin cloning fix

The revised code returned an uninitialized variable if the new test
failed.

The cloneu() case was ok but this changes it to keep parallel to the
clone_mon() case.
This commit is contained in:
PatR
2024-05-25 13:49:12 -07:00
parent 9df851d5da
commit 537fd6dd74
2 changed files with 18 additions and 6 deletions

View File

@@ -821,8 +821,9 @@ m_initinv(struct monst *mtmp)
/* Note: for long worms, always call cutworm (cutworm calls clone_mon) */
struct monst *
clone_mon(struct monst *mon,
coordxy x, coordxy y) /* clone's preferred location or 0 (near mon) */
clone_mon(
struct monst *mon,
coordxy x, coordxy y) /* clone's preferred location or 0 (near mon) */
{
coord mm;
struct monst *m2;