Choice issue when the first item is not available

This commit is contained in:
Bertrand Songis
2020-06-02 23:39:31 +02:00
parent baf7b199a2
commit 514612f271
+3 -3
View File
@@ -102,14 +102,14 @@ class Choice : public ChoiceBase {
return index;
}
int getValueFromIndex(unsigned index)
int getValueFromIndex(int index)
{
if (!isValueAvailable) {
return vmin + index;
}
int value = vmin;
while (index > 0) {
int value = vmin - 1;
while (index >= 0) {
index--;
value++;
while (value < vmax && !isValueAvailable(value)) {