Fix string encoding. Tests pass.

This commit is contained in:
Brian Carroll 2021-10-30 10:57:21 +01:00
parent 99b08ad395
commit 0ee482ae9e
2 changed files with 8 additions and 1 deletions

View file

@ -45,7 +45,7 @@ fn write_custom_section_header<T: SerialBuffer>(
// buffer.append_byte(SectionId::Custom as u8); // TODO: uncomment when we get rid of parity_wasm
let size_index = buffer.reserve_padded_u32();
let body_index = buffer.size();
buffer.append_slice(name.as_bytes());
name.serialize(buffer);
SectionHeaderIndices {
size_index,
body_index,