From 5b44a8bbf43bb4f1bd8c27d8eceae0111e729c89 Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Fri, 10 Nov 2017 20:24:19 +0100 Subject: Fixed use of undefined 'types' array in BinaryenAddGlobal tracing (#1279) * Fixed use of undefined 'types' array in BinaryenAddGlobal tracing * also fix use of 'expressions' --- src/binaryen-c.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index c97d0ec6c..03bc3fac7 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -794,7 +794,7 @@ BinaryenFunctionRef BinaryenAddFunction(BinaryenModuleRef module, const char* na BinaryenGlobalRef BinaryenAddGlobal(BinaryenModuleRef module, const char* name, BinaryenType type, int8_t mutable_, BinaryenExpressionRef init) { if (tracing) { - std::cout << " BinaryenAddGlobal(the_module, \"" << name << "\", types[" << type << "], " << mutable_ << ", " << expressions[init] << ");\n"; + std::cout << " BinaryenAddGlobal(the_module, \"" << name << "\", " << type << ", " << mutable_ << ", expressions[" << expressions[init] << "]);\n"; } auto* wasm = (Module*)module; -- cgit v1.2.3