Skip to content

Commit

Permalink
Fix all args not being passed to external functions
Browse files Browse the repository at this point in the history
  • Loading branch information
psvri committed Jan 16, 2025
1 parent 20ea8fb commit 3e9f3ae
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions core/translate/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,14 +742,16 @@ pub fn translate_expr(
}
Func::External(_) => {
let regs = program.alloc_registers(args_count);
for (i, arg_expr) in args.iter().enumerate() {
translate_expr(
program,
referenced_tables,
&arg_expr[i],
regs + i,
resolver,
)?;
if let Some(args) = args {
for (i, arg_expr) in args.iter().enumerate() {
translate_expr(
program,
referenced_tables,
&arg_expr,
regs + i,
resolver,
)?;
}
}
program.emit_insn(Insn::Function {
constant_mask: 0,
Expand Down

0 comments on commit 3e9f3ae

Please sign in to comment.