Off by one?

This commit is contained in:
Matt Nadareski
2025-09-25 16:20:15 -04:00
parent 75728a4d1d
commit d035211a64
2 changed files with 2 additions and 2 deletions

View File

@@ -154,7 +154,7 @@ namespace SabreTools.Serialization.Wrappers
}
// Otherwise, cache and return the data
overlaySize = Math.Min(overlaySize, int.MaxValue);
overlaySize = Math.Min(overlaySize, int.MaxValue - 1);
_overlayData = ReadRangeFromSource((int)endOfSectionData, (int)overlaySize);
return _overlayData;

View File

@@ -407,7 +407,7 @@ namespace SabreTools.Serialization.Wrappers
}
// Otherwise, cache and return the data
overlaySize = Math.Min(overlaySize, int.MaxValue);
overlaySize = Math.Min(overlaySize, int.MaxValue - 1);
_overlayData = ReadRangeFromSource(endOfSectionData, (int)overlaySize) ?? [];
return _overlayData;