File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -348,6 +348,12 @@ public static Module ReadFromBinary(Stream input)
348348 }
349349 break ;
350350
351+ case Section . DataCount : //Optional section, indicates the expected length of the data segment vector
352+ {
353+ reader . ReadUInt32 ( ) ;
354+ }
355+ break ;
356+
351357 default :
352358 throw new ModuleLoadException ( $ "Unrecognized section type { id } .", preSectionOffset ) ;
353359 }
Original file line number Diff line number Diff line change 1- namespace WebAssembly ;
1+ using System ;
2+
3+ namespace WebAssembly ;
24
35/// <summary>
46/// The standard section identifiers.
@@ -52,10 +54,14 @@ public enum Section : byte
5254 /// <summary>
5355 /// Data segments.
5456 /// </summary>
55- Data
57+ Data ,
58+ /// <summary>
59+ /// Optional segment which indicates the number of sata segments
60+ /// </summary>
61+ DataCount ,
5662}
5763
5864static class SectionExtensions
5965{
60- public static bool IsValid ( this Section section ) => section <= Section . Data ;
66+ public static bool IsValid ( this Section section ) => section <= Section . DataCount ;
6167}
You can’t perform that action at this time.
0 commit comments