File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ namespace LibCpp2IL.Wasm;
6
6
public class WasmMemoryBlock : ClassReadingBinaryReader
7
7
{
8
8
internal byte [ ] Bytes ;
9
+ private WasmFile _file ;
9
10
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 ;
11
13
12
14
private static MemoryStream BuildStream ( WasmFile file )
13
15
{
@@ -34,7 +36,7 @@ private static MemoryStream BuildStream(WasmFile file)
34
36
35
37
public WasmMemoryBlock ( WasmFile file ) : base ( BuildStream ( file ) )
36
38
{
37
- MetadataVersion = file . MetadataVersion ;
39
+ _file = file ;
38
40
is32Bit = true ;
39
41
Bytes = ( ( MemoryStream ) BaseStream ) . ToArray ( ) ;
40
42
}
You can’t perform that action at this time.
0 commit comments