Skip to content

Commit 1a89d7a

Browse files
committed
Fix: dipping into restore ability with no effect resulted in insane obj
The code always returned early, rather than only returning early when the potion got used up. In cases where the potion didn't do anything, this resulted in in_use still being set (and no "Interesting..." message being produced), causing sanity check failures.
1 parent a006bf8 commit 1a89d7a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/potion.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3122,9 +3122,10 @@ potion_dip(struct obj *obj, struct obj *potion)
31223122
}
31233123
if (learn_it && potion->dknown)
31243124
makeknown(POT_RESTORE_ABILITY);
3125-
if (did_something)
3125+
if (did_something) {
31263126
poof(potion); /* includes trycall if dknown */
3127-
return ECMD_TIME;
3127+
return ECMD_TIME;
3128+
}
31283129
}
31293130
more_dips:
31303131

0 commit comments

Comments
 (0)