]> granicus.if.org Git - nethack/commitdiff
U666 - inserting gold into a container
authorcohrs <cohrs>
Wed, 1 Oct 2003 03:37:55 +0000 (03:37 +0000)
committercohrs <cohrs>
Wed, 1 Oct 2003 03:37:55 +0000 (03:37 +0000)
The special-case code for the full menu style lacked an #ifndef GOLDOBJ
to handle the case where gold is the only thing in the hero was carrying.

doc/fixes34.3
src/pickup.c

index f51254781f4902a5037ffdb26638848c1914adb6..bbfd719b00ea74bff5953d4db07ab328643cc869 100644 (file)
@@ -38,6 +38,8 @@ if the monster that a statue represents is not made of flesh then don't
 attempting to saddle a cockatrice while wearing gloves shouldn't stone you
 kicking a closed drawbridge and dieing should not say "kicking a wall"
 cannot get blessed potions from sink, remove unreachable message
+couldn't insert gold into a container using full menu style if no other
+       objects in inventory unless compiling with GOLDOBJ
 
 
 Platform- and/or Interface-Specific Fixes
index e91611888eab0efd390fbf1392a8815e331fe6d8..8192798e8e40aca94f1b7bcf7f88c2ea44162528 100644 (file)
@@ -2114,10 +2114,14 @@ register int held;
                    int t;
                    char menuprompt[BUFSZ];
                    boolean outokay = (cnt != 0);
+#ifndef GOLDOBJ
+                   boolean inokay = (invent != 0) || (u.ugold != 0);
+#else
                    boolean inokay = (invent != 0);
+#endif
                    if (!outokay && !inokay) {
                        pline("%s", emptymsg);
-                       pline("You don't have anything to put in.");
+                       You("don't have anything to put in.");
                        return used;
                    }
                    menuprompt[0] = '\0';