Commit 5f972b81 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix crash when pos == -1

parent 53d52d6c
Pipeline #29067 passed with stage
in 19 minutes and 30 seconds
...@@ -919,6 +919,9 @@ int AutoCorrection::advancedAutocorrect() ...@@ -919,6 +919,9 @@ int AutoCorrection::advancedAutocorrect()
if (pos == -1) { if (pos == -1) {
pos = actualWordWithFirstUpperCase.lastIndexOf(i.key()); pos = actualWordWithFirstUpperCase.lastIndexOf(i.key());
} }
if (pos == -1) {
continue;
}
QString replacement = i.value(); QString replacement = i.value();
// Keep capitalized words capitalized. // Keep capitalized words capitalized.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment