diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 627d10f27..f2eb52321 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -495,12 +495,12 @@ whoami() { * Note that we trust the user here; it is possible to play under * somebody else's name. */ - register char *s; - #if defined(__APPLE__) /* Unixisms just confuse the user */ (void) strncpy(plname, "player", sizeof(plname)-1); #else + register char *s; + if (*plname) return FALSE; if(/* !*plname && */ (s = nh_getenv("USER"))) (void) strncpy(plname, s, sizeof(plname)-1);