]> granicus.if.org Git - nethack/commitdiff
Free command queues at end of game
authorPasi Kallinen <paxed@alt.org>
Fri, 6 Jan 2023 14:40:54 +0000 (16:40 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 6 Jan 2023 14:40:58 +0000 (16:40 +0200)
At end of game, the disclose prompts put commands into the queue,
but those weren't freed.

src/save.c

index 86a93c1d3fc63d74488aa7ac90c14e23cd2671c8..d6a512ecca71549d4b839914d413089f24a8cb04 100644 (file)
@@ -1209,6 +1209,8 @@ freedynamicdata(void)
     free_CapMons();
     free_rect();
     freeroleoptvals(); /* saveoptvals(&tnhfp) */
+    cmdq_clear(CQ_CANNED);
+    cmdq_clear(CQ_REPEAT);
 
     /* some pointers in iflags */
     if (iflags.wc_font_map)