diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:58 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:58 +0100 |
commit | e6d0a04ee4231400fe9cd4037bf89e2985a18bf3 (patch) | |
tree | 1628111f033af42b03582df0af425c0a62bd2392 /src/init1.cc | |
parent | e2b5157f29e66cb0ccb151bfd46ee43c8c745fe7 (diff) |
Remove e_name, e_text, e_head
Diffstat (limited to 'src/init1.cc')
-rw-r--r-- | src/init1.cc | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/init1.cc b/src/init1.cc index 2c89736b..66ea59ab 100644 --- a/src/init1.cc +++ b/src/init1.cc @@ -6569,7 +6569,7 @@ errr init_e_info_txt(FILE *fp, char *buf) if (i < error_idx) return (4); /* Verify information */ - if (i >= e_head->info_num) return (2); + if (i >= max_e_idx) return (2); /* Save the index */ error_idx = i; @@ -6577,17 +6577,9 @@ errr init_e_info_txt(FILE *fp, char *buf) /* Point at the "info" */ e_ptr = &e_info[i]; - /* Hack -- Verify space */ - if (e_head->name_size + strlen(s) + 8 > FAKE_NAME_SIZE) return (7); - - /* Advance and Save the name index */ - if (!e_ptr->name) e_ptr->name = ++e_head->name_size; - - /* Append chars to the name */ - strcpy(e_name + e_head->name_size, s); - - /* Advance the index */ - e_head->name_size += strlen(s); + /* Copy name */ + assert(!e_ptr->name); + e_ptr->name = my_strdup(s); /* Needed hack */ e_ptr->power = -1; @@ -6876,11 +6868,6 @@ errr init_e_info_txt(FILE *fp, char *buf) } - /* Complete the "name" and "text" sizes */ - ++e_head->name_size; - ++e_head->text_size; - - /* No version yet */ if (!okay) return (2); |