UPDATES: Fix endless loop

This commit is contained in:
Eugene Sandulenko 2016-04-03 23:09:31 +02:00
parent 717840b006
commit 0925e9cd29

View File

@ -41,9 +41,11 @@ const int *UpdateManager::getUpdateIntervals() {
int UpdateManager::normalizeInterval(int interval) {
const int *val = updateIntervals;
while (*val != -1)
while (*val != -1) {
if (*val > interval)
return *val;
val++;
}
return val[-1]; // Return maximal acceptable value
}