]> git.ipfire.org Git - thirdparty/libsolv.git/commit
solver_addbestrules: recalculate pointer to current rule after adding a new rule
authorMichael Schroeder <mls@suse.de>
Fri, 25 Jul 2025 09:08:59 +0000 (11:08 +0200)
committerMichael Schroeder <mls@suse.de>
Fri, 25 Jul 2025 09:10:33 +0000 (11:10 +0200)
commit8780860b347ee528a967c0c51770a723e9c07a34
treec7d66a28960b6ca3d119ed9e1418ee548f00a588
parent4677da6ecb703696e624f4fd24e94fa3e3f88c29
solver_addbestrules: recalculate pointer to current rule after adding a new rule

The code adds new rules in a FOR_RULELITERALS loop. The iterator needs
to access elements of the rule it iterates over, so if we add a new
rule in the loop body, we have to make sure that the pointer to the
current rule stays valid.

Fixes issue #594
src/rules.c