diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/binary-reader.cc | 1 | ||||
-rw-r--r-- | src/ir.h | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/binary-reader.cc b/src/binary-reader.cc index 8b7487a7..ac990f32 100644 --- a/src/binary-reader.cc +++ b/src/binary-reader.cc @@ -2122,7 +2122,6 @@ Result BinaryReader::ReadCodeSection(Offset section_size) { for (Index k = 0; k < num_local_decls; ++k) { Index num_local_types; CHECK_RESULT(ReadIndex(&num_local_types, "local type count")); - ERROR_UNLESS(num_local_types > 0, "local count must be > 0"); total_locals += num_local_types; ERROR_UNLESS(total_locals < UINT32_MAX, "local count must be < 0x10000000"); @@ -466,8 +466,9 @@ class LocalTypes { const Decls& decls() const { return decls_; } void AppendDecl(Type type, Index count) { - assert(count > 0); - decls_.emplace_back(type, count); + if (count != 0) { + decls_.emplace_back(type, count); + } } Index size() const; |