From dc938b7acf0c875ee3a2da96cfe1bec0239dc176 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 24 Jan 2025 18:24:26 -0500 Subject: [PATCH] don't hide the zero value of apport It was pointed out that it might not be a good idea to hide the illegal value of apport. --- src/dogmove.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dogmove.c b/src/dogmove.c index fe98fa551..fb214c54e 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -406,7 +406,8 @@ dog_invent(struct monst *mtmp, struct edog *edog, int udist) * Use udist+1 so steed won't cause divide by zero. */ if (droppables(mtmp)) { - if (!rn2(udist + 1) || (edog->apport && !rn2(edog->apport))) + assert(edog->apport > 0); + if (!rn2(udist + 1) || !rn2(edog->apport)) if (rn2(10) < edog->apport) { relobj(mtmp, (int) mtmp->minvis, TRUE); if (edog->apport > 1)