Skip to content

Commit

Permalink
Importer: Make a copy of the data when decrypting (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden authored Jan 8, 2024
2 parents 1fad3a4 + 173fa2f commit 5e806be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Refresh.GameServer/Importing/Importer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private bool IsMip(Span<byte> rawData)
try
{
//Decrypt the data
ReadOnlySpan<byte> data = ResourceHelper.PspDecrypt(rawData, PSPKey.Value);
ReadOnlySpan<byte> data = ResourceHelper.PspDecrypt(rawData.ToArray(), PSPKey.Value);

uint clutOffset = BinaryPrimitives.ReadUInt32LittleEndian(data[..4]);
uint width = BinaryPrimitives.ReadUInt32LittleEndian(data[4..8]);
Expand Down

0 comments on commit 5e806be

Please sign in to comment.