diff options
Diffstat (limited to 'dynamicdevice.c')
-rw-r--r-- | dynamicdevice.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dynamicdevice.c b/dynamicdevice.c index 7327f55..1758cf7 100644 --- a/dynamicdevice.c +++ b/dynamicdevice.c @@ -26,7 +26,7 @@ int cDynamicDevice::IndexOf(const char *DevPath, int &NextFreeIndex, int WishInd isyslog("dynamite: device at slot %d has cardindex %d", i + 1, dynamicdevice[i]->CardIndex()); if ((NextFreeIndex < 0) || ((WishIndex >= 0) && (dynamicdevice[i]->CardIndex() == WishIndex))) { NextFreeIndex = i; - if (dynamicdevice[i]->CardIndex() == WishIndex) + if ((dynamicdevice[i]->CardIndex() == WishIndex) && (index >= 0)) break; } } |