don't use the lengths of the buffer directly
This commit is contained in:
parent
711c48c80d
commit
fee79106d4
1 changed files with 3 additions and 3 deletions
|
@ -80,7 +80,7 @@ namespace Ryujinx.HLE.Loaders.Executables
|
||||||
|
|
||||||
Text = reader.ReadBytes(textSize);
|
Text = reader.ReadBytes(textSize);
|
||||||
|
|
||||||
if (flags.HasFlag(NsoFlags.IsTextCompressed) && Text.Length != 0)
|
if (flags.HasFlag(NsoFlags.IsTextCompressed) && textSize != 0)
|
||||||
{
|
{
|
||||||
Text = Lz4.Decompress(Text, textDecSize);
|
Text = Lz4.Decompress(Text, textDecSize);
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ namespace Ryujinx.HLE.Loaders.Executables
|
||||||
|
|
||||||
Ro = reader.ReadBytes(roSize);
|
Ro = reader.ReadBytes(roSize);
|
||||||
|
|
||||||
if (flags.HasFlag(NsoFlags.IsRoCompressed) && Ro.Length != 0)
|
if (flags.HasFlag(NsoFlags.IsRoCompressed) && roSize != 0)
|
||||||
{
|
{
|
||||||
Ro = Lz4.Decompress(Ro, roDecSize);
|
Ro = Lz4.Decompress(Ro, roDecSize);
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ namespace Ryujinx.HLE.Loaders.Executables
|
||||||
|
|
||||||
Data = reader.ReadBytes(dataSize);
|
Data = reader.ReadBytes(dataSize);
|
||||||
|
|
||||||
if (flags.HasFlag(NsoFlags.IsDataCompressed) && Data.Length != 0)
|
if (flags.HasFlag(NsoFlags.IsDataCompressed) && dataSize != 0)
|
||||||
{
|
{
|
||||||
Data = Lz4.Decompress(Data, dataDecSize);
|
Data = Lz4.Decompress(Data, dataDecSize);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue