Fix indexing problem in getChanGroup, which was causing seg fault when channel allocations in configuration are explicitly set.

This commit is contained in:
Harvind Samra
2015-08-27 23:07:53 -07:00
committed by Michael Iedema
parent c77b3ca30d
commit f6dd22cb5c

View File

@@ -359,9 +359,9 @@ static unsigned getChanGroup(vector<ChanType*>& chanList, ChanType **results)
}
prevFreeCh = chan;
}
//finished:
int firstIx = sz-bestI-1; // only works if backwards==true
for (int j = 0; j < bestN; j++) {
results[j] = chanList[bestI+j];
results[j] = chanList[firstIx+j];
}
return bestN;
}