From: nhmall Date: Sat, 25 Jun 2022 00:39:15 +0000 (-0400) Subject: environment variable TTYINV ignored X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c1c59dd898e178ab6d0fcb3be4dcddad3633be1;p=nethack environment variable TTYINV ignored > Setting TTTINV in the environment no longer has any effect > for me. Variable was set immediately prior to the all-zeros initialization. Fix the ordering of the two statements. --- diff --git a/src/invent.c b/src/invent.c index 236f1ea0a..630c7f452 100644 --- a/src/invent.c +++ b/src/invent.c @@ -5412,8 +5412,8 @@ core_update_invent_slot() char *envtmp = nh_getenv("TTYINV"); invmode = envtmp ? atoi(envtmp) : InvNormal; } - pi_info.fromcore.invmode = invmode; pi_info = zeropi; + pi_info.fromcore.invmode = invmode; /* Send the wport a request to get the related settings. */ pi_info.fromcore.core_request = request_settings; if ((pi = update_invent_slot(g.perm_invent_win, (slot = 0), &pi_info))) {