From 0925e9cd2966111ffde6f9de47d95869c4a74dc3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 3 Apr 2016 23:09:31 +0200 Subject: UPDATES: Fix endless loop --- common/updates.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/updates.cpp b/common/updates.cpp index 552324ef5a..4174a96c56 100644 --- a/common/updates.cpp +++ b/common/updates.cpp @@ -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 } -- cgit v1.2.3