Try to fix self-referencing MS-CAB

This commit is contained in:
Matt Nadareski
2025-11-13 14:07:46 -05:00
parent f7fd2f6f65
commit f2f0d0f2e7
2 changed files with 5 additions and 1 deletions

View File

@@ -55,7 +55,7 @@ namespace SabreTools.Data.Extensions
/// <summary>
/// Indicates if an array contains all ASCII numeric digits
/// </summary>
/// TODO: Move to IO as an array extension
/// TODO: Remove when IO is updated
public static bool IsNumericArray(this byte[] arr)
=> Array.TrueForAll(arr, b => b >= 0x30 && b <= 0x39);
}

View File

@@ -65,6 +65,10 @@ namespace SabreTools.Serialization.Wrappers
// Read in the cabinet parts sequentially
while (current.CabinetNext != null)
{
// If the current and next filenames match
if (Path.GetFileName(filename) == current.CabinetNext)
break;
// Open the next cabinet and try to parse
var next = current.OpenNext(filename);
if (next?.Header == null)