From 8fbc6c46620a243b2f1620da24e3115c247ff125 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 29 Aug 2025 11:28:37 -0400 Subject: [PATCH] Remove erroneous check --- .../Wrappers/InstallShieldCabinet.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/SabreTools.Serialization/Wrappers/InstallShieldCabinet.cs b/SabreTools.Serialization/Wrappers/InstallShieldCabinet.cs index 6905d916..a7e8c691 100644 --- a/SabreTools.Serialization/Wrappers/InstallShieldCabinet.cs +++ b/SabreTools.Serialization/Wrappers/InstallShieldCabinet.cs @@ -492,17 +492,8 @@ namespace SabreTools.Serialization.Wrappers return false; } - // Validate the number of bytes to read - ushort bytesToRead = BitConverter.ToUInt16(lengthArr, 0); - if (bytesToRead == 0) - { - Console.Error.WriteLine($"Failed to read file {index} ({GetFileName(index)}) because {nameof(bytesToRead)} can't be zero"); - reader.Dispose(); - output?.Close(); - return false; - } - // Attempt to read the specified number of bytes + ushort bytesToRead = BitConverter.ToUInt16(lengthArr, 0); inputBuffer = new byte[BUFFER_SIZE + 1]; if (!reader.Read(inputBuffer, 0, bytesToRead)) {