From: PatR Date: Wed, 30 Dec 2020 10:24:59 +0000 (-0800) Subject: ^G prompting revisited X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef4efdb1256b8ef68d3009ac144817e46ef75ecd;p=nethack ^G prompting revisited CP_TRYLIM-1 was the right value when the prompt augmentation was at the top of the loop before the first prompt, but should been changed to CP_TRYLIM when that got moved to the bottom of the loop. First prompt: |Create what kind of monster? Second and subsequent prompts if first attempt is unsuccessful: |Create what kind of monster? [type name or symbol] Prior to this fix, the shorter prompt was being used on the first and second tries and not switching to the longer one until the third. --- diff --git a/src/read.c b/src/read.c index 5d2c47bb3..130259ee3 100644 --- a/src/read.c +++ b/src/read.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 read.c $NHDT-Date: 1609285441 2020/12/29 23:44:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.213 $ */ +/* NetHack 3.7 read.c $NHDT-Date: 1609323865 2020/12/30 10:24:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.214 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2709,7 +2709,7 @@ create_particular() /* no good; try again... */ pline("I've never heard of such monsters."); /* when a second try is needed, expand the prompt */ - if (tryct == CP_TRYLIM - 1) + if (tryct == CP_TRYLIM) Strcat(prompt, " [type name or symbol]"); } while (--tryct > 0);