summaryrefslogtreecommitdiff
path: root/src/interp/interp-wasm-c-api.cc
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2021-12-09 13:35:36 -0800
committerGitHub <noreply@github.com>2021-12-09 13:35:36 -0800
commit9aba936bfab0fe9e639da6ea3b5fe3d8a3a0f1c0 (patch)
tree2d6ea864de6bb12a99cea25f32bd0d86efacab8a /src/interp/interp-wasm-c-api.cc
parentc22b147d2d44200983b39c8279f1f3c8c3a25ce2 (diff)
downloadwabt-9aba936bfab0fe9e639da6ea3b5fe3d8a3a0f1c0.tar.gz
wabt-9aba936bfab0fe9e639da6ea3b5fe3d8a3a0f1c0.tar.bz2
wabt-9aba936bfab0fe9e639da6ea3b5fe3d8a3a0f1c0.zip
Add error locations to BinaryReaderInterp (#1780)
I think it was always intended to work this way but was left as a TODO.
Diffstat (limited to 'src/interp/interp-wasm-c-api.cc')
-rw-r--r--src/interp/interp-wasm-c-api.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interp/interp-wasm-c-api.cc b/src/interp/interp-wasm-c-api.cc
index 4df66b89..9952c289 100644
--- a/src/interp/interp-wasm-c-api.cc
+++ b/src/interp/interp-wasm-c-api.cc
@@ -632,8 +632,8 @@ own wasm_module_t* wasm_module_new(wasm_store_t* store,
const wasm_byte_vec_t* binary) {
Errors errors;
ModuleDesc module_desc;
- if (Failed(ReadBinaryInterp(binary->data, binary->size, GetOptions(), &errors,
- &module_desc))) {
+ if (Failed(ReadBinaryInterp("<internal>", binary->data, binary->size,
+ GetOptions(), &errors, &module_desc))) {
FormatErrorsToFile(errors, Location::Type::Binary);
return nullptr;
}