From d2813bc0a41f3dcb41dbf530e05e3b03846d8bf2 Mon Sep 17 00:00:00 2001 From: Michael Ferris Date: Tue, 25 Oct 2016 13:17:30 -0700 Subject: [PATCH] Fix legacy build --- lib/Runtime/Library/WasmLibrary.cpp | 4 ++-- lib/WasmReader/WasmModule.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Runtime/Library/WasmLibrary.cpp b/lib/Runtime/Library/WasmLibrary.cpp index 9d68df455e7..cf8f7a1f152 100644 --- a/lib/Runtime/Library/WasmLibrary.cpp +++ b/lib/Runtime/Library/WasmLibrary.cpp @@ -415,8 +415,8 @@ namespace Js Assert(sourceGlobal->GetReferenceType() != Wasm::WasmGlobal::ImportedReference); //no imported globals at this point if (sourceGlobal->GetReferenceType() != Wasm::WasmGlobal::Const) { - throw Wasm::WasmCompilationException(_u("Global %d is initialized with global %d " - "which is not a const. Forward references aren't supported!"), i, global->var.num); + throw Wasm::WasmCompilationException(_u("Global %d is initialized with global %d ") + _u("which is not a const. Forward references aren't supported!"), i, global->var.num); } global->SetReferenceType(Wasm::WasmGlobal::Const); //resolve global to const global->cnst = sourceGlobal->cnst; diff --git a/lib/WasmReader/WasmModule.cpp b/lib/WasmReader/WasmModule.cpp index dceaca278a1..0fe841c3192 100644 --- a/lib/WasmReader/WasmModule.cpp +++ b/lib/WasmReader/WasmModule.cpp @@ -29,9 +29,10 @@ WasmModule::WasmModule(Js::ScriptContext* scriptContext, byte* binaryBuffer, uin heapOffset(0), funcOffset(0), importFuncOffset(0), - globalCounts {0, 0, 0, 0, 0}, //the first elm is the number of Vars in front of I32; makes for a nicer offset computation globals (&m_alloc) { + //the first elm is the number of Vars in front of I32; makes for a nicer offset computation + memset(globalCounts, 0, sizeof( uint ) * WasmTypes::Limit); m_reader = Anew(&m_alloc, WasmBinaryReader, &m_alloc, this, binaryBuffer, binaryBufferLength); m_reader->InitializeReader(); }