diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-10-05 18:45:08 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-10-05 18:45:08 +0200 |
commit | 0cea35759ed072d3a42b54926d6fee7d12346418 (patch) | |
tree | 7752493505b81e2f1e942bc7481721dca613bd34 /src/init1.cc | |
parent | 1726fc7a8ab66c15385bdda8f0533cddeb867b58 (diff) |
Change set_type name/desc to std::string
Diffstat (limited to 'src/init1.cc')
-rw-r--r-- | src/init1.cc | 15 |
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; |