Fix correction infinite loop
This commit is contained in:
parent
6d820ad229
commit
a197edd62b
@ -39,6 +39,8 @@ QString Corrector::substituteUser(const QString &source,
|
|||||||
|
|
||||||
for (auto it = range.first; it != range.second; ++it) {
|
for (auto it = range.first; it != range.second; ++it) {
|
||||||
const auto &sub = it->second;
|
const auto &sub = it->second;
|
||||||
|
if (!result.contains(sub.source))
|
||||||
|
continue;
|
||||||
const auto len = sub.source.length();
|
const auto len = sub.source.length();
|
||||||
if (len > bestMatchLen) {
|
if (len > bestMatchLen) {
|
||||||
bestMatchLen = len;
|
bestMatchLen = len;
|
||||||
|
Loading…
Reference in New Issue
Block a user