fixed games handling
This commit is contained in:
@@ -8,7 +8,6 @@ namespace AssetStudio
|
||||
{
|
||||
public class OffsetStream : Stream
|
||||
{
|
||||
|
||||
private readonly Stream _baseStream;
|
||||
private long _offset;
|
||||
|
||||
@@ -81,13 +80,26 @@ namespace AssetStudio
|
||||
else
|
||||
{
|
||||
using var reader = new FileReader(path, this, true);
|
||||
var signature = reader.FileType switch
|
||||
|
||||
var readSignature = reader.FileType;
|
||||
var signature = "";
|
||||
|
||||
if (readSignature == FileType.BundleFile ||
|
||||
readSignature == FileType.MhyFile ||
|
||||
readSignature == FileType.Blb3File)
|
||||
{
|
||||
FileType.BundleFile => "UnityFS\x00",
|
||||
FileType.MhyFile => "mhy",
|
||||
FileType.Blb3File => "Blb\x03",
|
||||
_ => throw new InvalidOperationException()
|
||||
};
|
||||
switch (reader.FileType)
|
||||
{
|
||||
case FileType.BundleFile:
|
||||
signature = "UnityFS\x00";
|
||||
break;
|
||||
case FileType.MhyFile:
|
||||
signature = "mhy";
|
||||
break;
|
||||
case FileType.Blb3File:
|
||||
signature = "Blb\x03";
|
||||
break;
|
||||
}
|
||||
|
||||
Logger.Verbose($"Parsed signature: {signature}");
|
||||
|
||||
@@ -109,6 +121,18 @@ namespace AssetStudio
|
||||
}
|
||||
}
|
||||
ArrayPool<byte>.Shared.Return(buffer);
|
||||
} else
|
||||
{
|
||||
while (Remaining > 0)
|
||||
{
|
||||
Offset = AbsolutePosition;
|
||||
yield return AbsolutePosition;
|
||||
if (Offset == AbsolutePosition)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user