Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GameFramework/Resource/ResourceManager.ResourceLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ public byte[] LoadBinaryFromFileSystem(string binaryAssetName)
}

IFileSystem fileSystem = m_ResourceManager.GetFileSystem(resourceInfo.FileSystemName, resourceInfo.StorageInReadOnly);
byte[] bytes = fileSystem.ReadFile(resourceInfo.ResourceName.FullName);
byte[] bytes = fileSystem.ReadFile(binaryAssetName);
if (bytes == null)
{
return null;
Expand Down
4 changes: 2 additions & 2 deletions GameFramework/Utility/Utility.Encryption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static class Encryption
/// <returns>异或后的二进制流。</returns>
public static byte[] GetQuickXorBytes(byte[] bytes, byte[] code)
{
return GetXorBytes(bytes, 0, QuickEncryptLength, code);
return GetXorBytes(bytes, 0, Math.Min(QuickEncryptLength, bytes.Length), code);
}

/// <summary>
Expand All @@ -36,7 +36,7 @@ public static byte[] GetQuickXorBytes(byte[] bytes, byte[] code)
/// <param name="code">异或二进制流。</param>
public static void GetQuickSelfXorBytes(byte[] bytes, byte[] code)
{
GetSelfXorBytes(bytes, 0, QuickEncryptLength, code);
GetSelfXorBytes(bytes, 0, Math.Min(QuickEncryptLength, bytes.Length), code);
}

/// <summary>
Expand Down