]> granicus.if.org Git - nethack/commitdiff
GOLDOBJ zero payment in money2mon
authorcohrs <cohrs>
Sat, 29 Jun 2002 18:04:30 +0000 (18:04 +0000)
committercohrs <cohrs>
Sat, 29 Jun 2002 18:04:30 +0000 (18:04 +0000)
backport of fix to slashem-Bugs-566538 from <Someone>.  money2mon
only makes sense if called with a non-zero amount.

doc/fixes34.1
src/shk.c

index c3568c7a1b6cc44420a5877d7c218ad7863eb2dc..e292ee1476077b5188ec98e5d2531b05a2cb8386 100644 (file)
@@ -126,6 +126,7 @@ naming an already wielded elven dagger "Sting" activates warning against orcs
 naming either of the wielded weapons unintentionally ends two-weapon combat
 Various nemesis monsters must resist stoning so their death messages make sense
 don't call DEBUG impossible in rn2 when a level 0 monster tries to cast a spell
+GOLDOBJ: don't call money2mon with 0 zero when killed by shopkeeper
 
 
 Platform- and/or Interface-Specific Fixes
index 69ae12a357d79f0e75b5ff96b982f46a7362f982..7eeabc24907abfb99a7629bf6c8db069920202f8 100644 (file)
--- a/src/shk.c
+++ b/src/shk.c
@@ -1666,7 +1666,7 @@ boolean croaked;
                if (loss > umoney || !loss || roomno == eshkp->shoproom) {
                        eshkp->robbed -= umoney;
                        if (eshkp->robbed < 0L) eshkp->robbed = 0L;
-                        money2mon(shkp, umoney);
+                        if (umoney > 0) money2mon(shkp, umoney);
 #endif
                        flags.botl = 1;
                        pline("%s %s all your possessions.",