From d3b940b2b07ff15eed6335cb1f88dd73dc3a977e Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 20 Aug 2025 00:17:21 +0100 Subject: [PATCH] Do not print empty format dependent contents in Blu-ray's DI. --- Aaru.Decoders/Bluray/DI.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Aaru.Decoders/Bluray/DI.cs b/Aaru.Decoders/Bluray/DI.cs index cd8861b6e..bbde4f0d5 100644 --- a/Aaru.Decoders/Bluray/DI.cs +++ b/Aaru.Decoders/Bluray/DI.cs @@ -425,8 +425,13 @@ public static class DI sb.AppendFormat(Localization.Disc_product_revision_number_0, unit.ProductRevisionNumber).AppendLine(); } - sb.AppendLine(Localization.Blu_ray_DI_Unit_format_dependent_contents_as_hex_follows); - sb.AppendLine(Markup.Escape(PrintHex.ByteArrayToHexArrayString(unit.FormatDependentContents, color: true))); + if(unit.FormatDependentContents is not null) + { + sb.AppendLine(Localization.Blu_ray_DI_Unit_format_dependent_contents_as_hex_follows); + + sb.AppendLine(Markup.Escape(PrintHex.ByteArrayToHexArrayString(unit.FormatDependentContents, + color: true))); + } } return sb.ToString();