We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0719eb commit 3f553f5Copy full SHA for 3f553f5
1 file changed
LibCpp2IL/Wasm/WasmMemoryBlock.cs
@@ -6,8 +6,10 @@ namespace LibCpp2IL.Wasm;
6
public class WasmMemoryBlock : ClassReadingBinaryReader
7
{
8
internal byte[] Bytes;
9
+ private WasmFile _file;
10
- public override float MetadataVersion { get; }
11
+ //This isn't valid until Init() is called on the parent WasmFile, but that's fine, nothing should be referencing it until then.
12
+ public override float MetadataVersion => _file.MetadataVersion;
13
14
private static MemoryStream BuildStream(WasmFile file)
15
@@ -34,7 +36,7 @@ private static MemoryStream BuildStream(WasmFile file)
34
36
35
37
public WasmMemoryBlock(WasmFile file) : base(BuildStream(file))
38
- MetadataVersion = file.MetadataVersion;
39
+ _file = file;
40
is32Bit = true;
41
Bytes = ((MemoryStream)BaseStream).ToArray();
42
}
0 commit comments