summaryrefslogtreecommitdiff
path: root/src/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cc')
-rw-r--r--src/util.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/util.cc b/src/util.cc
index 8f3374d5..efbd4e38 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -3430,27 +3430,23 @@ std::string get_day(s32b day_no)
}
}
-cptr get_player_race_name(int pr, int ps)
+std::string get_player_race_name(int pr, int ps)
{
- static char buf[50];
-
if (ps)
{
if (race_mod_info[ps].place)
{
- sprintf(buf, "%s %s", race_info[pr].title, race_mod_info[ps].title);
+ return std::string(race_info[pr].title) + " " + race_mod_info[ps].title;
}
else
{
- sprintf(buf, "%s %s", race_mod_info[ps].title, race_info[pr].title);
+ return std::string(race_mod_info[ps].title) + " " + race_info[pr].title;
}
}
else
{
- sprintf(buf, "%s", race_info[pr].title);
+ return std::string(race_info[pr].title);
}
-
- return (buf);
}
/*