summaryrefslogtreecommitdiff
path: root/src/binary-reader-objdump.cc
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2019-02-20 13:51:30 -0800
committerGitHub <noreply@github.com>2019-02-20 13:51:30 -0800
commit601d488f919e464b9dc80f5b3a3d8498fad10bba (patch)
tree1174b6109d37930ef3da1326689ae9c3f2ade993 /src/binary-reader-objdump.cc
parent4eec05224dd67d12e9b4c7e9f929d581871997b2 (diff)
downloadwabt-601d488f919e464b9dc80f5b3a3d8498fad10bba.tar.gz
wabt-601d488f919e464b9dc80f5b3a3d8498fad10bba.tar.bz2
wabt-601d488f919e464b9dc80f5b3a3d8498fad10bba.zip
Add wasm-objdump fuzzing script; fix fuzz bugs (#1023)
Diffstat (limited to 'src/binary-reader-objdump.cc')
-rw-r--r--src/binary-reader-objdump.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc
index 13db1497..5ae59ffb 100644
--- a/src/binary-reader-objdump.cc
+++ b/src/binary-reader-objdump.cc
@@ -592,8 +592,9 @@ Result BinaryReaderObjdumpDisassemble::OnEndFunc() {
}
Result BinaryReaderObjdumpDisassemble::OnEndExpr() {
- indent_level--;
- assert(indent_level >= 0);
+ if (indent_level > 0) {
+ indent_level--;
+ }
LogOpcode(0, nullptr);
return Result::Ok;
}