From 70ebe7d03d00bb140c766581d8fddf24b6918be8 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 21 Jun 2025 17:10:28 -0400 Subject: [PATCH] Add temporary workaround for writing TerritoryType Of their packed boolean columns has 3 extra bytes at the end... for some reason. Just like the other test case, I added a temporary workaround for it. --- src/exd_file_operations.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/exd_file_operations.rs b/src/exd_file_operations.rs index eeb3845..18945d4 100644 --- a/src/exd_file_operations.rs +++ b/src/exd_file_operations.rs @@ -174,6 +174,14 @@ pub fn write_rows(rows: &Vec, exh: &EXH) -> BinResult<()> { { 0u32.write_le(writer).unwrap(); } + + // TODO: temporary workaround until i can figure out why this *specific* packed boolean column in TerritoryType has three extra bytes at the end + if definition.offset == 60 + && definition.data_type == ColumnDataType::PackedBool0 + && column_definitions.len() == 44 + { + [0u8; 3].write_le(writer).unwrap(); + } } };