summaryrefslogtreecommitdiff
path: root/src/loadsave.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:49:38 +0200
commit1bbed63b66c0f69809e698576a51501150f06bba (patch)
treef458361c0c2e7dac2502b1aace63d83d5dbd15b4 /src/loadsave.cc
parentb9fca0267b1d6a32d57e1fb4387f52c19d1c3fa6 (diff)
Move k_info into GameEditData
Diffstat (limited to 'src/loadsave.cc')
-rw-r--r--src/loadsave.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/loadsave.cc b/src/loadsave.cc
index 8d05cb43..1329827f 100644
--- a/src/loadsave.cc
+++ b/src/loadsave.cc
@@ -1056,6 +1056,8 @@ static bool_ wearable_p(object_type *o_ptr)
*/
static void do_item(object_type *o_ptr, ls_flag_t flag)
{
+ auto &k_info = game->edit_data.k_info;
+
byte old_dd;
byte old_ds;
@@ -2112,11 +2114,13 @@ static bool do_monster_lore(ls_flag_t flag)
*/
static bool do_object_lore(ls_flag_t flag)
{
- u16b n_kinds = max_k_idx;
+ auto &k_info = game->edit_data.k_info;
+
+ u16b n_kinds = k_info.size();
do_u16b(&n_kinds, flag);
- if ((flag == ls_flag_t::LOAD) && (n_kinds > max_k_idx))
+ if ((flag == ls_flag_t::LOAD) && (n_kinds > k_info.size()))
{
note("Too many object kinds!");
return false;