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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user