commit 1c4dd79b9b522a71fd8389160f65fd5fffa3ec53
parent 56fc8f6d30f343cae9b7ea9a6ce0502e57eb776e
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 7 May 2020 13:06:04 +0200
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/files.c b/src/files.c
@@ -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;