File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ namespace LibCpp2IL.Wasm;
66public class WasmMemoryBlock : ClassReadingBinaryReader
77{
88 internal byte [ ] Bytes ;
9+ private WasmFile _file ;
910
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 ;
1113
1214 private static MemoryStream BuildStream ( WasmFile file )
1315 {
@@ -34,7 +36,7 @@ private static MemoryStream BuildStream(WasmFile file)
3436
3537 public WasmMemoryBlock ( WasmFile file ) : base ( BuildStream ( file ) )
3638 {
37- MetadataVersion = file . MetadataVersion ;
39+ _file = file ;
3840 is32Bit = true ;
3941 Bytes = ( ( MemoryStream ) BaseStream ) . ToArray ( ) ;
4042 }
You can’t perform that action at this time.
0 commit comments