mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Fixing binary paths array wrongly iterated up to binaryPaths->length() (#216)
This commit is contained in:
@@ -34,9 +34,9 @@ GPService::~GPService()
|
||||
|
||||
QString GPService::findBinary()
|
||||
{
|
||||
for (int i = 0; i < binaryPaths->length(); i++) {
|
||||
if (QFileInfo::exists(binaryPaths[i])) {
|
||||
return binaryPaths[i];
|
||||
for (auto& binaryPath : binaryPaths) {
|
||||
if (QFileInfo::exists(binaryPath)) {
|
||||
return binaryPath;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
|
Reference in New Issue
Block a user