mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-07-08 18:06:41 +00:00
Use const for data offset
This commit is contained in:
@@ -77,6 +77,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
}
|
||||
private Dictionary<string, Models.InstallShieldArchiveV3.File>? _fileNameMap = null;
|
||||
|
||||
/// <summary>
|
||||
/// Data offset for all archives
|
||||
/// </summary>
|
||||
private const uint DataStart = 255;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
@@ -201,7 +206,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
filename = Path.Combine(dirName, filename);
|
||||
|
||||
// Get and adjust the file offset
|
||||
long fileOffset = file.Offset + 255; // Static offset
|
||||
long fileOffset = file.Offset + DataStart;
|
||||
if (fileOffset < 0 || fileOffset >= Length)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user