diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-03-15 12:42:10 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-03-15 12:44:54 -0700 |
commit | 34b3761d3daf29c181da8c72edfc9a0b9bf1e6db (patch) | |
tree | 0d036b37f6a96f2c923df71726386a44e3ab8415 /src | |
parent | 00f0c39b82f0a46bacce7f884699c3f01d51cd8e (diff) | |
download | binaryen-34b3761d3daf29c181da8c72edfc9a0b9bf1e6db.tar.gz binaryen-34b3761d3daf29c181da8c72edfc9a0b9bf1e6db.tar.bz2 binaryen-34b3761d3daf29c181da8c72edfc9a0b9bf1e6db.zip |
num params in signatures is LEB128
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-binary.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index ba0554fd8..a24bad3c8 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -468,7 +468,7 @@ public: o << LEB128(wasm->functionTypes.size()); for (auto* type : wasm->functionTypes) { if (debug) std::cerr << "write one" << std::endl; - o << int8_t(type->params.size()); + o << LEB128(type->params.size()); o << binaryWasmType(type->result); for (auto param : type->params) { o << binaryWasmType(param); @@ -1183,7 +1183,7 @@ public: for (size_t i = 0; i < numTypes; i++) { if (debug) std::cerr << "read one" << std::endl; auto curr = allocator.alloc<FunctionType>(); - size_t numParams = getInt8(); + size_t numParams = getLEB128(); if (debug) std::cerr << "num params: " << numParams << std::endl; curr->result = getWasmType(); for (size_t j = 0; j < numParams; j++) { |