Fix incorrect hash logic

The stream hadn't been reset causing all hashes to be the same in most cases
This commit is contained in:
LotP1 2024-12-10 22:42:39 +01:00
parent c2a3b490f3
commit 6dc63de2f0

View file

@ -642,6 +642,7 @@ namespace Ryujinx.HLE.HOS
Logger.Info?.Print(LogClass.ModLoader, $"NSO '{nsoName}' replaced"); Logger.Info?.Print(LogClass.ModLoader, $"NSO '{nsoName}' replaced");
using (MD5 md5 = MD5.Create()) using (MD5 md5 = MD5.Create())
{ {
stream.Seek(0, SeekOrigin.Begin);
tempHash += BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", "").ToLowerInvariant(); tempHash += BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", "").ToLowerInvariant();
} }
} }