Skip to content

Commit

Permalink
fix(compiler): Read custom sections in full (grain-lang#1243)
Browse files Browse the repository at this point in the history
  • Loading branch information
ospencer authored May 22, 2022
1 parent aea3ea9 commit f8a0891
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions compiler/src/utils/wasm_utils.re
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,8 @@ module BinarySection =
/* Now we're at the start of the section. Time to read */
let realsize = size - (pos_in(inchan) - offset);
let bytes = Bytes.create(realsize);
if (input(inchan, bytes, 0, realsize) == realsize) {
Some(Spec.deserialize(bytes));
} else {
process(tl);
};
really_input(inchan, bytes, 0, realsize);
Some(Spec.deserialize(bytes));
| _ => process(tl)
};
};
Expand Down

0 comments on commit f8a0891

Please sign in to comment.