From 2aa699b5b07d6925a88d184a127563f072d4b5e0 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Wed, 27 Dec 2023 21:11:13 -0800 Subject: [PATCH] always generate the same length for box arrays in ItemRT conversion --- src/RareItemSet.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/RareItemSet.cc b/src/RareItemSet.cc index 29ad4d01..eef1ce5d 100644 --- a/src/RareItemSet.cc +++ b/src/RareItemSet.cc @@ -136,10 +136,16 @@ std::string RareItemSet::ParsedRELData::serialize_t(bool is_v1) const { for (const auto& drop : this->box_rares) { w.put_u8(drop.area); } + for (size_t z = this->box_rares.size(); z < 30; z++) { + w.put_u8(0xFF); + } root.box_rares_offset = w.size(); for (const auto& drop : this->box_rares) { w.put(PackedDrop(drop.drop)); } + for (size_t z = this->box_rares.size(); z < 30; z++) { + w.put_u32l(0x00000000); + } while (w.size() & 3) { w.put_u8(0); }