diff options
-rw-r--r-- | src/wasm/wasm-binary.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index 52e4b958d..b3314134d 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -73,7 +73,7 @@ void WasmBinaryWriter::write() { } #ifdef BUILD_LLVM_DWARF - // Update DWARF user sections after writing the data referred to by them + // Update DWARF user sections after writing the data they refer to // (function bodies), and before writing the user sections themselves. if (Debug::hasDWARFSections(*wasm)) { Debug::writeDWARFSections(*wasm, binaryLocations); @@ -113,7 +113,7 @@ void WasmBinaryWriter::writeResizableLimits(Address initial, } template<typename T> int32_t WasmBinaryWriter::startSection(T code) { - o << U32LEB(code); + o << uint8_t(code); if (sourceMap) { sourceMapLocationsSizeAtSectionStart = sourceMapLocations.size(); } @@ -849,7 +849,7 @@ bool WasmBinaryBuilder::hasDWARFSections() { getInt32(); // version bool has = false; while (more()) { - uint32_t sectionCode = getU32LEB(); + uint8_t sectionCode = getInt8(); uint32_t payloadLen = getU32LEB(); if (uint64_t(pos) + uint64_t(payloadLen) > input.size()) { throwError("Section extends beyond end of input"); @@ -885,7 +885,7 @@ void WasmBinaryBuilder::read() { // read sections until the end while (more()) { - uint32_t sectionCode = getU32LEB(); + uint8_t sectionCode = getInt8(); uint32_t payloadLen = getU32LEB(); if (uint64_t(pos) + uint64_t(payloadLen) > input.size()) { throwError("Section extends beyond end of input"); |