Skip to content

Commit bf04b13

Browse files
committed
[MERGE #1825 @Cellule] Fix legacy build
Merge pull request #1825 from Cellule:users/micfer/legacy
2 parents a130522 + d2813bc commit bf04b13

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/Runtime/Library/WasmLibrary.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ namespace Js
415415
Assert(sourceGlobal->GetReferenceType() != Wasm::WasmGlobal::ImportedReference); //no imported globals at this point
416416
if (sourceGlobal->GetReferenceType() != Wasm::WasmGlobal::Const)
417417
{
418-
throw Wasm::WasmCompilationException(_u("Global %d is initialized with global %d "
419-
"which is not a const. Forward references aren't supported!"), i, global->var.num);
418+
throw Wasm::WasmCompilationException(_u("Global %d is initialized with global %d ")
419+
_u("which is not a const. Forward references aren't supported!"), i, global->var.num);
420420
}
421421
global->SetReferenceType(Wasm::WasmGlobal::Const); //resolve global to const
422422
global->cnst = sourceGlobal->cnst;

lib/WasmReader/WasmModule.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ WasmModule::WasmModule(Js::ScriptContext* scriptContext, byte* binaryBuffer, uin
2929
heapOffset(0),
3030
funcOffset(0),
3131
importFuncOffset(0),
32-
globalCounts {0, 0, 0, 0, 0}, //the first elm is the number of Vars in front of I32; makes for a nicer offset computation
3332
globals (&m_alloc)
3433
{
34+
//the first elm is the number of Vars in front of I32; makes for a nicer offset computation
35+
memset(globalCounts, 0, sizeof( uint ) * WasmTypes::Limit);
3536
m_reader = Anew(&m_alloc, WasmBinaryReader, &m_alloc, this, binaryBuffer, binaryBufferLength);
3637
m_reader->InitializeReader();
3738
}

0 commit comments

Comments
 (0)