diff options
author | Ben Smith <binji@chromium.org> | 2020-09-08 12:34:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 12:34:14 -0700 |
commit | 812a5a031fe6b9ae41cb8755e32a49315633ab58 (patch) | |
tree | a3a926834f5a9b43ab168d9e95db0599f4c8c8df /src/type.h | |
parent | c3b9c32b6165295c536e5884dfcfe8e4bdf7a811 (diff) | |
download | wabt-812a5a031fe6b9ae41cb8755e32a49315633ab58.tar.gz wabt-812a5a031fe6b9ae41cb8755e32a49315633ab58.tar.bz2 wabt-812a5a031fe6b9ae41cb8755e32a49315633ab58.zip |
Fix bug when writing multi-value block type (#1533)
* Fix bug when writing multi-value block type
The block type must be written as an SLEB, not an LEB. We also want it
to be relocatable, so I added a way to write a fixed-size SLEB too
(`WriteS32Leb128WithReloc` and `WriteFixedS32Leb128`).
* Fix ubsan issue
Diffstat (limited to 'src/type.h')
-rw-r--r-- | src/type.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -33,7 +33,7 @@ using TypeVector = std::vector<Type>; class Type { public: // Matches binary format, do not change. - enum Enum { + enum Enum : int32_t { I32 = -0x01, // 0x7f I64 = -0x02, // 0x7e F32 = -0x03, // 0x7d |