Skip to content

Commit

Permalink
Fix windows CI issue
Browse files Browse the repository at this point in the history
Signed-off-by: Harry Chiang <[email protected]>
  • Loading branch information
harry900831 committed Aug 29, 2023
1 parent 328e6ae commit 4d9b433
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/validator/formchecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,10 @@ Expect<void> FormChecker::checkInstr(const AST::Instruction &Instr) {
auto [TryCnt, CatchCnt] = countCtrlStackType(*D + 1);
auto &NonConstInstr = const_cast<AST::Instruction &>(Instr);
if (*D + 1 < CtrlStack.size()) {
NonConstInstr.setTryBlockVSize(Locals.size() +
NonConstInstr.setTryBlockVSize(static_cast<uint32_t>(Locals.size()) +
CtrlStack[*D + 1].Height);
} else {
NonConstInstr.setTryBlockVSize(Locals.size() + ValStack.size());
NonConstInstr.setTryBlockVSize(static_cast<uint32_t>(Locals.size()) + ValStack.size());
}
// The try block itself may push an additional handler to stack
NonConstInstr.setTryBlockHOffset(TryCnt);
Expand All @@ -373,7 +373,7 @@ Expect<void> FormChecker::checkInstr(const AST::Instruction &Instr) {
return Unexpect(Res);
}
if (Instr.getOpCode() == OpCode::Try) {
const_cast<AST::Instruction &>(Instr).setTryBlockParamNum(T1.size());
const_cast<AST::Instruction &>(Instr).setTryBlockParamNum(static_cast<uint32_t>(T1.size()));
}
// Pop and check [t1*]
if (auto Res = popTypes(T1); !Res) {
Expand Down

0 comments on commit 4d9b433

Please sign in to comment.