diff --git a/include/flag.h b/include/flag.h index 81630bd27..a8f9172f7 100644 --- a/include/flag.h +++ b/include/flag.h @@ -216,6 +216,7 @@ struct instance_flags { boolean sanity_check; /* run sanity checks */ boolean mon_polycontrol; /* debug: control monster polymorphs */ boolean in_dumplog; /* doing the dumplog right now? */ + boolean in_parse; /* is a command being parsed? */ /* stuff that is related to options and/or user or platform preferences */ diff --git a/src/cmd.c b/src/cmd.c index 0272ec0b9..4da0509d2 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -5125,6 +5125,7 @@ parse() register int foo; boolean prezero = FALSE; + iflags.in_parse = TRUE; multi = 0; context.move = 1; flush_screen(1); /* Flush screen buffer. Put the cursor on the hero. */ @@ -5191,6 +5192,8 @@ parse() clear_nhwindow(WIN_MESSAGE); if (prezero) in_line[0] = Cmd.spkeys[NHKF_ESC]; + + iflags.in_parse = FALSE; return in_line; }