summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/newgame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/newgame.cc')
-rw-r--r--crawl-ref/source/newgame.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 196bf9e142..363c9f5c19 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -384,9 +384,9 @@ bool new_game(void)
// copy name into you.your_name if set from environment --
// note that you.your_name could already be set from init.txt
// this, clearly, will overwrite such information {dlb}
- if (SysEnv.crawl_name)
+ if (!SysEnv.crawl_name.empty())
{
- strncpy( you.your_name, SysEnv.crawl_name, kNameLen );
+ strncpy( you.your_name, SysEnv.crawl_name.c_str(), kNameLen );
you.your_name[ kNameLen - 1 ] = 0;
}