]> granicus.if.org Git - nethack/commitdiff
Fix potential warning in music.c
authornhmall <nhmall@nethack.org>
Wed, 25 Jan 2023 20:21:30 +0000 (15:21 -0500)
committernhmall <nhmall@nethack.org>
Wed, 25 Jan 2023 20:21:30 +0000 (15:21 -0500)
I saw this included in PR966, but it has nothing to do with the
use-after-free that the pull request is meant to fix. It should
get applied independently of that pull request.

src/music.c

index 8c21c6f3e72650d70c3aaf7b9b163a32a0f56ba2..99bc653f42fc7bb204ce25ed65229dddab301b1e 100644 (file)
@@ -886,6 +886,8 @@ obj_to_instr(struct obj *obj) {
             ret_instr = ins_melodic_tom;
             break;
     }
+#else
+    nhUse(obj);
 #endif
     return ret_instr;
 }