diff --git a/GSM/GSMConfig.cpp b/GSM/GSMConfig.cpp index 135b60b..75ce845 100644 --- a/GSM/GSMConfig.cpp +++ b/GSM/GSMConfig.cpp @@ -359,9 +359,9 @@ static unsigned getChanGroup(vector& 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; }