files: trigger the Easter egg only when "zzy" is typed at the prompt

When the user mentions the file "zzy" on the command line,
the magic spell "Xyzzy" does not actually get typed, so the
Easter egg should then not be triggered.
master
Benno Schulenberg 2020-05-07 13:06:04 +02:00
parent 56fc8f6d30
commit 1c4dd79b9b
1 changed files with 1 additions and 1 deletions

View File

@ -2177,7 +2177,7 @@ int do_writeout(bool exiting, bool withprompt)
* this is the first time we've done this, show an Easter
* egg. Display the credits. */
if (!did_credits && exiting && !ISSET(SAVE_ON_EXIT) &&
strcasecmp(answer, "zzy") == 0) {
openfile->filename[0] == '\0' && strcasecmp(answer, "zzy") == 0) {
if (LINES > 5 && COLS > 31) {
do_credits();
did_credits = TRUE;