diff --git a/readimc/mcd_file.py b/readimc/mcd_file.py index d94c14a..e9d492d 100644 --- a/readimc/mcd_file.py +++ b/readimc/mcd_file.py @@ -201,6 +201,7 @@ def read_slide( if data_start_offset == data_end_offset == 0: return None data_start_offset += 161 + data_end_offset -= 1 if data_start_offset >= data_end_offset: raise IOError( f"MCD file '{self.path.name}' corrupted: " @@ -236,6 +237,7 @@ def read_panorama( if data_start_offset == data_end_offset == 0: return None data_start_offset += 161 + data_end_offset -= 1 if data_start_offset >= data_end_offset: raise IOError( f"MCD file '{self.path.name}' corrupted: " @@ -276,6 +278,7 @@ def read_before_ablation_image( if data_start_offset == data_end_offset == 0: return None data_start_offset += 161 + data_end_offset -= 1 if data_start_offset >= data_end_offset: raise IOError( f"MCD file '{self.path.name}' corrupted: " @@ -318,6 +321,7 @@ def read_after_ablation_image( if data_start_offset == data_end_offset == 0: return None data_start_offset += 161 + data_end_offset -= 1 if data_start_offset >= data_end_offset: raise IOError( f"MCD file '{self.path.name}' corrupted: "