Commit 491c3501 authored by mercury233's avatar mercury233 Committed by GitHub

fix div 0 in OPCODE_DIV (#2984)

parent b360ed98
......@@ -1440,7 +1440,7 @@ static bool is_declarable(const T& cd, const std::vector<unsigned int>& opcode)
stack.pop();
int lhs = stack.top();
stack.pop();
stack.push(lhs / rhs);
stack.push(rhs != 0 ? lhs / rhs : 0);
}
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment