summaryrefslogtreecommitdiff
path: root/src/xtra2.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
commitd33961f89a0c80f2fae4020184e72467b5c192cf (patch)
tree0144849f69a8c202873f44975bdf11f9cd771c1e /src/xtra2.cc
parent3cdeb22086fc177165acb2d7b6530ccc230ec8e6 (diff)
Move race_info and race_mod_info to GameEditData
Diffstat (limited to 'src/xtra2.cc')
-rw-r--r--src/xtra2.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xtra2.cc b/src/xtra2.cc
index 5ed06491..040299ff 100644
--- a/src/xtra2.cc
+++ b/src/xtra2.cc
@@ -5288,9 +5288,11 @@ static void corrupt_corrupted(void)
/*
* Change to an other subrace
*/
-void switch_subrace(int racem, bool_ copy_old)
+void switch_subrace(std::size_t racem, bool_ copy_old)
{
- if ((racem < 0) && (racem >= max_rmp_idx)) return;
+ auto &race_mod_info = game->edit_data.race_mod_info;
+
+ assert(racem < race_mod_info.size());
/* If we switch to the saved subrace, we copy over the old subrace data */
if (copy_old && (racem == SUBRACE_SAVE))