diff --git a/ArcFormats/BlackRainbow/ArcGSP.cs b/ArcFormats/BlackRainbow/ArcGSP.cs index 87132fe3..c032cc0d 100644 --- a/ArcFormats/BlackRainbow/ArcGSP.cs +++ b/ArcFormats/BlackRainbow/ArcGSP.cs @@ -118,7 +118,7 @@ namespace GameRes.Formats.BlackRainbow } var entry = FormatCatalog.Instance.Create (name); entry.Offset = offset + 0x24; - entry.Size = i + 1 < index.Count ? (uint)(index[i+1] - offset) : (uint)(file.MaxOffset - offset); + entry.Size = (uint)((i + 1 < index.Count ? index[i+1] : file.MaxOffset) - entry.Offset); dir.Add (entry); } return new ArcFile (file, this, dir);