From: Michael Meyer Date: Thu, 4 Aug 2022 17:53:12 +0000 (-0400) Subject: Fix: command counts greater than 2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b51a22c6c94d1c7efa0f419a19c72f95ac8cf84;p=nethack Fix: command counts greater than 2 Entering a count to repeat an action stopped working for counts greater than 2 after 93db2a8: the unconditional call to reset_cmd_vars at the top of rhack was resetting many more variables than had previously been cleared at that point, including g.multi (which in this context tracks how many more times the requested action should be repeated). As a result any count would perform the requested action twice at most. Reduce the list of variables zeroed out at the start of rhack back to what it was before 93db2a8. --- diff --git a/src/cmd.c b/src/cmd.c index fe8a42c40..4428a27b6 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -4473,7 +4473,8 @@ rhack(char *cmd) const struct ext_func_tab *cmdq_ec = 0, *prefix_seen = 0; boolean was_m_prefix = FALSE; - reset_cmd_vars(FALSE); + iflags.menu_requested = FALSE; + g.context.nopick = 0; got_prefix_input: #ifdef SAFERHANGUP if (g.program_state.done_hup)