CControlAPI::GetBouquetCGI fix segfault

This commit is contained in:
Jacek Jendrzej
2013-10-12 22:01:17 +02:00
parent 03b7151563
commit 733f7a5382

View File

@@ -966,6 +966,9 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh) {
BouquetNr = atoi(hh->ParamList["bouquet"].c_str()); BouquetNr = atoi(hh->ParamList["bouquet"].c_str());
if (BouquetNr > 0) if (BouquetNr > 0)
BouquetNr--; BouquetNr--;
if((BouquetNr > 0) && (BouquetNr >= bsize))
BouquetNr = bsize-1;
startBouquet = BouquetNr; startBouquet = BouquetNr;
bsize = BouquetNr+1; bsize = BouquetNr+1;
} }