Fix add check for invalid argv index for vtab constraints in main loop

This commit is contained in:
PThorpe92
2025-05-24 14:46:34 -04:00
parent 58e1d5a4f8
commit a2f8b2dfea

View File

@@ -391,6 +391,10 @@ pub fn open_loop(
// translate the opposite side of the referenced vtab column
let expr = if is_rhs { lhs } else { rhs };
// argv_index is 1-based; adjust to get the proper register offset.
if argv_index == 0 {
// invalid since argv_index is 1-based
continue;
}
let target_reg =
start_reg + (argv_index - 1) as usize;
translate_expr(