summaryrefslogtreecommitdiff
path: root/src/type.h
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2020-09-08 12:34:14 -0700
committerGitHub <noreply@github.com>2020-09-08 12:34:14 -0700
commit812a5a031fe6b9ae41cb8755e32a49315633ab58 (patch)
treea3a926834f5a9b43ab168d9e95db0599f4c8c8df /src/type.h
parentc3b9c32b6165295c536e5884dfcfe8e4bdf7a811 (diff)
downloadwabt-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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type.h b/src/type.h
index aaa8aba0..c44b54f1 100644
--- a/src/type.h
+++ b/src/type.h
@@ -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