]> git.tdb.fi Git - libs/core.git/blobdiff - source/strings/regex.cpp
Fix an incorrect comparison
[libs/core.git] / source / strings / regex.cpp
index 6122fe40c557c9716cca6e88e7b2926408ad29ef..68cf374dcd2544064e45ce661ddb01768f962f1d 100644 (file)
@@ -513,7 +513,7 @@ bool Regex::group_compare(const RegMatch::Group &g1, const RegMatch::Group &g2)
        // Earlier match is better
        if(g1.begin<g2.begin)
                return true;
-       if(g2.begin>g2.begin)
+       if(g1.begin>g2.begin)
                return false;
 
        // Longer match at same position is better