From 9f03520f508a9a77778dd98433aaee46562bbd5b Mon Sep 17 00:00:00 2001 From: Perfare Date: Sat, 18 Dec 2021 10:35:10 +0800 Subject: [PATCH] fixed #471 --- Il2CppDumper/ExecutableFormats/WebAssembly.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Il2CppDumper/ExecutableFormats/WebAssembly.cs b/Il2CppDumper/ExecutableFormats/WebAssembly.cs index eb0a6e3..36ad64a 100644 --- a/Il2CppDumper/ExecutableFormats/WebAssembly.cs +++ b/Il2CppDumper/ExecutableFormats/WebAssembly.cs @@ -46,8 +46,7 @@ namespace Il2CppDumper public WebAssemblyMemory CreateMemory() { - var last = dataSections[dataSections.Length - 1]; - var stream = new MemoryStream((int)last.Offset + last.Data.Length); + var stream = new MemoryStream(new byte[Length]); foreach (var dataSection in dataSections) { stream.Position = dataSection.Offset;