Index: src/wasm/decoder.h |
diff --git a/src/wasm/decoder.h b/src/wasm/decoder.h |
index 8b4e1bd223c6afd072b91a7ae54ad5d065412ae3..f9de2e1143fb71451a7e7bbbd04f9d30190dfd90 100644 |
--- a/src/wasm/decoder.h |
+++ b/src/wasm/decoder.h |
@@ -329,7 +329,7 @@ class Decoder { |
} |
bool ok() const { return error_pc_ == nullptr; } |
- bool failed() const { return error_pc_ != nullptr; } |
+ bool failed() const { return !error_msg_.is_empty(); } |
bool more() const { return pc_ < limit_; } |
const byte* start() { return start_; } |