File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,15 @@ def ImportSection(self):
206206 return (True )
207207
208208 def FunctionSection (self ):
209- pass
209+ section = self .module .function_section
210+ if section is None :
211+ return (True )
212+ csection = self .module .code_section
213+ if csection is None :
214+ return (False )
215+ if len (section .type_section_index ) != len (csection .func_bodies ):
216+ return (False )
217+ return (True )
210218
211219 def TableSection (self ):
212220 pass
@@ -261,7 +269,8 @@ def ValidateAll(self):
261269 return (False )
262270 if not self .ImportSection ():
263271 return (False )
264- self .FunctionSection ()
272+ if not self .FunctionSection ():
273+ return (False )
265274 self .TableSection ()
266275 self .MemorySection ()
267276 if not self .GlobalSection ():
You can’t perform that action at this time.
0 commit comments