summaryrefslogtreecommitdiff
path: root/src/init1.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:58 +0100
committerBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:58 +0100
commit11056413f0457bca511ad6f875219e031a2c3503 (patch)
tree79b3c49932a59162d207148cfa89561a3574cc3a /src/init1.cc
parentdaede88ba01cc86d982ff2f2f40fdf517cb90ab0 (diff)
Remove ow_head, ow_name
Diffstat (limited to 'src/init1.cc')
-rw-r--r--src/init1.cc27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/init1.cc b/src/init1.cc
index 8ce1524..79ae95f 100644
--- a/src/init1.cc
+++ b/src/init1.cc
@@ -9740,18 +9740,12 @@ errr init_ow_info_txt(FILE *fp, char *buf)
/* Current entry */
owner_type *ow_ptr = NULL;
-
/* Just before the first record */
error_idx = -1;
/* Just before the first line */
error_line = -1;
-
- /* Start the "fake" stuff */
- ow_head->name_size = 0;
- ow_head->text_size = 0;
-
/* Parse */
fp_stack_init(fp);
while (0 == my_fgets_dostack(buf, 1024))
@@ -9813,7 +9807,7 @@ errr init_ow_info_txt(FILE *fp, char *buf)
if (i < error_idx) return (4);
/* Verify information */
- if (i >= ow_head->info_num) return (2);
+ if (i >= max_ow_idx) return (2);
/* Save the index */
error_idx = i;
@@ -9821,17 +9815,9 @@ errr init_ow_info_txt(FILE *fp, char *buf)
/* Point at the "info" */
ow_ptr = &ow_info[i];
- /* Hack -- Verify space */
- if (ow_head->name_size + strlen(s) + 8 > FAKE_NAME_SIZE) return (7);
-
- /* Advance and Save the name index */
- if (!ow_ptr->name) ow_ptr->name = ++ow_head->name_size;
-
- /* Append chars to the name */
- strcpy(ow_name + ow_head->name_size, s);
-
- /* Advance the index */
- ow_head->name_size += strlen(s);
+ /* Copy name */
+ assert(!ow_ptr->name);
+ ow_ptr->name = my_strdup(s);
/* Next... */
continue;
@@ -9933,11 +9919,6 @@ errr init_ow_info_txt(FILE *fp, char *buf)
return (6);
}
-
- /* Complete the "name" and "text" sizes */
- ++ow_head->name_size;
- ++ow_head->text_size;
-
/* No version yet */
if (!okay) return (2);