Fix #11493: Incorrect flow values in LinkGraphJob::EdgeAnnotation (#11494)

wip-string
Jonathan G Rennison 6 months ago committed by GitHub
parent c6b9227dbb
commit c5a292c0df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -221,7 +221,7 @@ void Path::Fork(Path *base, uint cap, int free_cap, uint dist)
uint Path::AddFlow(uint new_flow, LinkGraphJob &job, uint max_saturation)
{
if (this->parent != nullptr) {
LinkGraphJob::EdgeAnnotation edge = job[this->parent->node][this->node];
LinkGraphJob::EdgeAnnotation &edge = job[this->parent->node][this->node];
if (max_saturation != UINT_MAX) {
uint usable_cap = edge.base.capacity * max_saturation / 100;
if (usable_cap > edge.Flow()) {

Loading…
Cancel
Save