mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-06 05:38:48 +08:00
ArcViewStream 64位
This commit is contained in:
@@ -90,9 +90,9 @@ namespace GameRes
|
|||||||
Name = name ?? "";
|
Name = name ?? "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArcViewStream (ArcView file, long offset, uint size, string name = null)
|
public ArcViewStream (ArcView file, long offset, long size, string name = null)
|
||||||
{
|
{
|
||||||
m_view = new ArcView.Frame (file, offset, Math.Min (size, MaxFrameSize));
|
m_view = new ArcView.Frame (file, offset, (uint)Math.Min (size, MaxFrameSize));
|
||||||
m_start = offset;
|
m_start = offset;
|
||||||
m_size = size;
|
m_size = size;
|
||||||
m_position = 0;
|
m_position = 0;
|
||||||
|
|||||||
@@ -214,9 +214,11 @@ namespace GameRes
|
|||||||
public ArcViewStream CreateStream (long offset)
|
public ArcViewStream CreateStream (long offset)
|
||||||
{
|
{
|
||||||
var size = this.MaxOffset - offset;
|
var size = this.MaxOffset - offset;
|
||||||
if (size > uint.MaxValue)
|
if (size < 0)
|
||||||
throw new ArgumentOutOfRangeException ("Too large memory mapped stream");
|
{
|
||||||
return new ArcViewStream (this, offset, (uint)size);
|
throw new ArgumentOutOfRangeException(nameof(offset), "Greater than archive size");
|
||||||
|
}
|
||||||
|
return new ArcViewStream (this, offset, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArcViewStream CreateStream (long offset, uint size, string name = null)
|
public ArcViewStream CreateStream (long offset, uint size, string name = null)
|
||||||
|
|||||||
Reference in New Issue
Block a user