]> granicus.if.org Git - nethack/commitdiff
Fix uninitialized var in dip
authorPasi Kallinen <paxed@alt.org>
Thu, 14 Apr 2022 15:59:03 +0000 (18:59 +0300)
committerPasi Kallinen <paxed@alt.org>
Thu, 14 Apr 2022 15:59:03 +0000 (18:59 +0300)
src/potion.c

index 03efa0db2641465bc3b442862397cd0aa0e14b31..5a1e0d286726fb43c36843ae1b61b68ecec2e1f1 100644 (file)
@@ -2212,11 +2212,12 @@ dodip(void)
     if (inaccessible_equipment(obj, "dip", FALSE))
         return ECMD_OK;
 
+    shortestname = (is_plural(obj) || pair_of(obj)) ? "them" : "it";
+
     drink_ok_extra = 0;
     /* preceding #dip with 'm' skips the possibility of dipping into
        fountains and pools plus the prompting which those entail */
     if (!iflags.menu_requested) {
-        shortestname = (is_plural(obj) || pair_of(obj)) ? "them" : "it";
         /*
          * Bypass safe_qbuf() since it doesn't handle varying suffix without
          * an awful lot of support work.  Format the object once, even though