point code index to switch_on_term after appending indexed clause to single-clause predicate (#1346)

This commit is contained in:
Mark Thom
2022-03-12 20:12:28 -07:00
parent 3513a9c7ba
commit 5463c1d47f

View File

@@ -1212,7 +1212,11 @@ fn append_compiled_clause(
);
if lower_bound == 0 && !skeleton.core.is_dynamic {
code_ptr_opt = Some(target_pos_clause_start);
code_ptr_opt = Some(if index_loc < target_pos_clause_start {
index_loc
} else {
target_pos_clause_start
});
}
}