Skip to content

Commit 5b44a8b

Browse files
dcodeIOkripken
authored andcommitted
Fixed use of undefined 'types' array in BinaryenAddGlobal tracing (#1279)
* Fixed use of undefined 'types' array in BinaryenAddGlobal tracing * also fix use of 'expressions'
1 parent 566e2c1 commit 5b44a8b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/binaryen-c.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ BinaryenFunctionRef BinaryenAddFunction(BinaryenModuleRef module, const char* na
794794

795795
BinaryenGlobalRef BinaryenAddGlobal(BinaryenModuleRef module, const char* name, BinaryenType type, int8_t mutable_, BinaryenExpressionRef init) {
796796
if (tracing) {
797-
std::cout << " BinaryenAddGlobal(the_module, \"" << name << "\", types[" << type << "], " << mutable_ << ", " << expressions[init] << ");\n";
797+
std::cout << " BinaryenAddGlobal(the_module, \"" << name << "\", " << type << ", " << mutable_ << ", expressions[" << expressions[init] << "]);\n";
798798
}
799799

800800
auto* wasm = (Module*)module;

0 commit comments

Comments
 (0)