fix clamping problem for maximally bad goodness

This commit is contained in:
Bob Halley 2000-02-11 02:58:44 +00:00
parent 73016bd7ef
commit 9e89140c97

View file

@ -3796,7 +3796,7 @@ dns_adb_adjustgoodness(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
new_goodness = old_goodness + goodness_adjustment;
} else {
if (old_goodness < INT_MIN - goodness_adjustment)
new_goodness = INT_MAX;
new_goodness = INT_MIN;
else
new_goodness = old_goodness + goodness_adjustment;
}