From d96be61e296031d5417e46dba1d3b9060b2ab6c0 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 18 Mar 2021 22:50:28 -0700 Subject: [PATCH] Fix GC compatiblity by always exporting id tables (if empty just write 0xFFFF) --- lib/AudioGroupProject.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/AudioGroupProject.cpp b/lib/AudioGroupProject.cpp index 958b8a3..3cb2116 100644 --- a/lib/AudioGroupProject.cpp +++ b/lib/AudioGroupProject.cpp @@ -57,8 +57,11 @@ static void ReadRangedObjectIds(NameDB* db, athena::io::IStreamReader& r, NameDB template static void WriteRangedObjectIds(athena::io::IStreamWriter& w, const T& list) { - if (list.cbegin() == list.cend()) + if (list.cbegin() == list.cend()) { + uint16_t term = 0xffff; + athena::io::Write::Do({}, term, w); return; + } bool inRange = false; uint16_t lastId = list.cbegin()->first.id & 0x3fff; for (auto it = list.cbegin() + 1; it != list.cend(); ++it) {