diff --git a/test/item_legacy.cpp b/test/item_legacy.cpp index 3d704b37..8554cd7d 100644 --- a/test/item_legacy.cpp +++ b/test/item_legacy.cpp @@ -14,8 +14,13 @@ #include "race.hpp" static void set_item_name(legacy::item_record_type& item, const std::string& full, const std::string& name) { - std::copy_n(full.begin(), std::min(25, 1 + full.size()), item.full_name); - std::copy_n(name.begin(), std::min(15, 1 + name.size()), item.name); + size_t full_size = std::min(24, full.size()); + std::copy_n(full.begin(), full_size, item.full_name); + item.full_name[full_size] = '\0'; + + size_t name_size = std::min(14, name.size()); + std::copy_n(name.begin(), name_size, item.name); + item.name[name_size] = '\0'; } TEST_CASE("Converting items from legacy scenarios") { diff --git a/test/out_write.cpp b/test/out_write.cpp index c33a5c8d..67d2ca53 100644 --- a/test/out_write.cpp +++ b/test/out_write.cpp @@ -80,6 +80,8 @@ TEST_CASE("Saving an outdoors sector") { wand.friendly[1] = 12; wand.end_spec1 = 210; wand.end_spec2 = 22; + wand.cant_flee = true; + wand.forced = true; REQUIRE(out.special_enc.size() >= 1); out.special_enc[0] = spec; diff --git a/test/town_legacy.cpp b/test/town_legacy.cpp index 95f08b71..5dcb9694 100644 --- a/test/town_legacy.cpp +++ b/test/town_legacy.cpp @@ -19,7 +19,7 @@ TEST_CASE("Converting legacy town data") { cScenario scen; - scen.ter_types.resize(5); + scen.ter_types.resize(16); legacy::town_record_type old_town = {0}; SECTION("With basic data") {