Merge branch 'bobbydurrett-mailenvfix' into NetHack-3.6.0

This commit is contained in:
Pasi Kallinen
2016-06-18 20:39:22 +03:00

View File

@@ -90,7 +90,12 @@ free_maildata()
void
getmailstatus()
{
if (!mailbox && !(mailbox = nh_getenv("MAIL"))) {
char *emailbox;
if (emailbox = nh_getenv("MAIL")) {
mailbox = (char *) alloc((unsigned) strlen(emailbox));
Strcpy(mailbox, emailbox);
}
if (!mailbox) {
#ifdef MAILPATH
#ifdef AMS
struct passwd ppasswd;