use find_inner_choice_instr when appending an indexed clause to an indexed subsequence
This commit is contained in:
@@ -1001,22 +1001,22 @@ fn append_compiled_clause(
|
|||||||
AppendOrPrepend::Append,
|
AppendOrPrepend::Append,
|
||||||
);
|
);
|
||||||
|
|
||||||
if lower_bound + 1 == target_pos {
|
let target_pos_clause_start = find_inner_choice_instr(
|
||||||
let lower_bound_clause_start = find_inner_choice_instr(
|
|
||||||
code,
|
code,
|
||||||
skeleton.clauses[lower_bound].clause_start,
|
skeleton.clauses[target_pos - 1].clause_start,
|
||||||
index_loc,
|
index_loc,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if lower_bound + 1 == target_pos {
|
||||||
set_switch_var_offset(
|
set_switch_var_offset(
|
||||||
code,
|
code,
|
||||||
index_loc,
|
index_loc,
|
||||||
lower_bound_clause_start - index_loc,
|
target_pos_clause_start - index_loc,
|
||||||
retraction_info,
|
retraction_info,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
skeleton.clauses[target_pos - 1].clause_start
|
target_pos_clause_start // skeleton.clauses[target_pos - 1].clause_start
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
skeleton.clauses[target_pos].opt_arg_index_key += clause_loc;
|
skeleton.clauses[target_pos].opt_arg_index_key += clause_loc;
|
||||||
|
|||||||
Reference in New Issue
Block a user