fix section parsing

This commit is contained in:
Ilya Rezvov
2018-02-19 18:38:54 -08:00
parent 928fa3a606
commit f1eae1969a
2 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ getSection sectionType parser def = do
where
parseSection op
| op == 0 = skipCustomSection >> getSection sectionType parser def
| op == fromEnum sectionType = (getULEB128 :: Get Natural) >> parser
| op == fromEnum sectionType = getWord8 >> (getULEB128 :: Get Natural) >> parser
| op > fromEnum sectionType = return def
| otherwise =
fail $ "Incorrect order of sections. Expected " ++ show sectionType