From 0efc550fa61a4eebecbd957dd6d8e35c4d662c3a Mon Sep 17 00:00:00 2001 From: shadowninja108 Date: Sat, 22 Sep 2018 21:52:30 -0700 Subject: [PATCH] Better handling of the IsCompressed flag in Nso.cs --- libhac/Nso.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libhac/Nso.cs b/libhac/Nso.cs index 11da2a6b..5b412593 100644 --- a/libhac/Nso.cs +++ b/libhac/Nso.cs @@ -110,7 +110,10 @@ namespace LibHac { byte[] compressed = new byte[CompressedSize]; OpenCompressedStream().Read(compressed, 0, (int) CompressedSize); - return Lz4.Decompress(compressed, (int) DecompressedSize); + if (IsCompressed) + return Lz4.Decompress(compressed, (int)DecompressedSize); + else + return compressed; } }