summaryrefslogtreecommitdiff
path: root/src/init1.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-10-05 18:45:08 +0200
committerBardur Arantsson <bardur@scientician.net>2016-10-05 18:45:08 +0200
commit0cea35759ed072d3a42b54926d6fee7d12346418 (patch)
tree7752493505b81e2f1e942bc7481721dca613bd34 /src/init1.cc
parent1726fc7a8ab66c15385bdda8f0533cddeb867b58 (diff)
Change set_type name/desc to std::string
Diffstat (limited to 'src/init1.cc')
-rw-r--r--src/init1.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/init1.cc b/src/init1.cc
index 7d8afaa9..b68309b7 100644
--- a/src/init1.cc
+++ b/src/init1.cc
@@ -2926,10 +2926,10 @@ errr init_set_info_txt(FILE *fp)
/* Point at the "info" */
set_ptr = &expand_to_fit_index(set_info, i);
+ assert(set_ptr->name.empty());
/* Copy name */
- assert(!set_ptr->name);
- set_ptr->name = my_strdup(s);
+ set_ptr->name = s;
/* Next... */
continue;
@@ -2941,11 +2941,14 @@ errr init_set_info_txt(FILE *fp)
/* Process 'D' for "Description" */
if (buf[0] == 'D')
{
- /* Acquire the text */
- char const *s = buf + 2;
+ /* Need newline? */
+ if (!set_ptr->desc.empty())
+ {
+ set_ptr->desc += '\n';
+ }
- /* Append chars to the description */
- strappend(&set_ptr->desc, s);
+ /* Append */
+ set_ptr->desc += (buf + 2);
/* Next... */
continue;