summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-24 16:26:48 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-24 16:26:48 +0200
commit6bbd3e9e43fddca75b87d5bca1fc1a37faf87357 (patch)
treea07916f901ac860052e7562d2ec0f5efc51e40dc /crawl-ref/source/acr.cc
parente4d195a439f1cbcd6a4302a3fd7d7454cfb04d42 (diff)
downloadcrawl-ref-6bbd3e9e43fddca75b87d5bca1fc1a37faf87357.tar.gz
crawl-ref-6bbd3e9e43fddca75b87d5bca1fc1a37faf87357.zip
Convert player::your_name to std::string.
Doesn't seem to break anything...
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 9873519f4c..59294d07f9 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1925,11 +1925,7 @@ void process_command( command_type cmd )
break;
case CMD_CHARACTER_DUMP:
- char name_your[kNameLen+1];
-
- strncpy(name_your, you.your_name, kNameLen);
- name_your[kNameLen] = 0;
- if (dump_char( name_your, false ))
+ if (dump_char(you.your_name, false))
mpr("Char dumped successfully.");
else
mpr("Char dump unsuccessful! Sorry about that.");
@@ -3611,11 +3607,10 @@ static bool _initialise(void)
#ifdef CLUA_BINDINGS
clua.runhook("chk_startgame", "b", newc);
- std::string yname = you.your_name;
+ std::string yname = you.your_name; // XXX: what's this for?
read_init_file(true);
Options.fixup_options();
- strncpy(you.your_name, yname.c_str(), kNameLen);
- you.your_name[kNameLen - 1] = 0;
+ you.your_name = yname;
// In case Lua changed the character set.
init_char_table(Options.char_set);