Fix GC compatiblity by always exporting id tables (if empty just write 0xFFFF)

This commit is contained in:
Phillip Stephens 2021-03-18 22:50:28 -07:00
parent 217e791b88
commit d96be61e29
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
1 changed files with 4 additions and 1 deletions

View File

@ -57,8 +57,11 @@ static void ReadRangedObjectIds(NameDB* db, athena::io::IStreamReader& r, NameDB
template <athena::Endian DNAE, class T>
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<athena::io::PropType::None>::Do<decltype(term), DNAE>({}, term, w);
return;
}
bool inRange = false;
uint16_t lastId = list.cbegin()->first.id & 0x3fff;
for (auto it = list.cbegin() + 1; it != list.cend(); ++it) {