Skip to content

Commit

Permalink
fix(DaedalusVm): Fix integer underflow in register_default_external
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Nov 11, 2023
1 parent cd8092c commit 9d7c3f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DaedalusVm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,8 @@ namespace zenkit {
_m_default_external = [this, callback](DaedalusVm& v, DaedalusSymbol& sym) {
// pop all parameters from the stack
auto params = find_parameters_for_function(&sym);
for (auto i = params.size() - 1; i >= 0; --i) {
auto par = params[i];
for (int i = static_cast<int>(params.size()) - 1; i >= 0; --i) {
auto par = params[static_cast<unsigned>(i)];

if (par->type() == DaedalusDataType::INT)
(void) v.pop_int();
Expand Down

0 comments on commit 9d7c3f7

Please sign in to comment.