mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Fix ignoring of incorrect version strings in search plugins. Closes #7101.
Printing of Version with all components set to zero was segfaulting due to underflow in array index. Also add log message for such plugins.
This commit is contained in:
@@ -117,7 +117,7 @@ namespace Utils
|
||||
{
|
||||
// find the last one non-zero component
|
||||
std::size_t lastSignificantIndex = N - 1;
|
||||
while (lastSignificantIndex >= 0 && (*this)[lastSignificantIndex] == 0)
|
||||
while (lastSignificantIndex > 0 && (*this)[lastSignificantIndex] == 0)
|
||||
--lastSignificantIndex;
|
||||
|
||||
if (lastSignificantIndex + 1 < Mandatory) // lastSignificantIndex >= 0
|
||||
|
||||
Reference in New Issue
Block a user