diff options
Diffstat (limited to 'src/wasm/wasm-emscripten.cpp')
-rw-r--r-- | src/wasm/wasm-emscripten.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp index 684c789c3..bcf9539a6 100644 --- a/src/wasm/wasm-emscripten.cpp +++ b/src/wasm/wasm-emscripten.cpp @@ -450,9 +450,9 @@ std::string EmscriptenGlueGenerator::generateEmscriptenMetadata() { for (const auto& ex : wasm.exports) { if (ex->kind == ExternalKind::Global) { const Global* g = wasm.getGlobal(ex->value); - assert(g->type == Type::i32); + assert(g->type == Type::i32 || g->type == Type::i64); Const* init = g->init->cast<Const>(); - uint32_t addr = init->value.geti32(); + uint64_t addr = init->value.getInteger(); meta << nextElement() << '"' << ex->name.str << "\" : \"" << addr << '"'; } |