From: Max Lapan Date: Tue, 16 Mar 2010 08:46:43 +0000 (+0300) Subject: Fixed bug with incorrect index2minutes calculation. X-Git-Tag: v0.1~31 X-Git-Url: http://vcs.maemo.org/git/?p=yandex-traffic;a=commitdiff_plain;h=27a079e27813fae5d9577c4af63abdf54176d6cd Fixed bug with incorrect index2minutes calculation. --- diff --git a/settings.cpp b/settings.cpp index c294802..36464aa 100644 --- a/settings.cpp +++ b/settings.cpp @@ -122,7 +122,7 @@ int Settings::intervalIndex2Minutes (int index) const { int int2min[] = { -1, 1, 2, 5, 15, 30 }; - if (index < 0 || sizeof (int2min) / sizeof (int2min[0])) + if (index < 0 || sizeof (int2min) / sizeof (int2min[0]) <= index) return -1; return int2min[index];