diff options
Diffstat (limited to 'games/hack/hack.mkshop.c')
| -rw-r--r-- | games/hack/hack.mkshop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/games/hack/hack.mkshop.c b/games/hack/hack.mkshop.c index 9d99a22d2cb2..7a8fdfbfaaa6 100644 --- a/games/hack/hack.mkshop.c +++ b/games/hack/hack.mkshop.c @@ -19,10 +19,10 @@ register char let; int roomno; register struct monst *shk; #ifdef WIZARD +extern char *getenv(); +register char *ep = getenv("SHOPTYPE"); /* first determine shoptype */ if(wizard){ - extern char *getenv(); - register char *ep = getenv("SHOPTYPE"); if(ep){ if(*ep == 'z' || *ep == 'Z'){ mkzoo(ZOO); @@ -58,7 +58,7 @@ gottype: continue; if( #ifdef WIZARD - (wizard && getenv("SHOPTYPE") && sroom->doorct != 0) || + (wizard && ep != NULL && sroom->doorct != 0) || #endif WIZARD sroom->doorct <= 2 && sroom->doorct > 0) break; } |
