fix section parsing

This commit is contained in:
Ilya Rezvov committed 2018-02-19 18:38:54 -08:00
1 parent 928fa3a606
commit f1eae1969a
2 files changed
+3 -6

No files matched your search

+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