mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-20 23:07:43 +00:00
avoid spell check with out of range start value
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35292 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ed4ae48e85
commit
9b1e0fc3c8
@ -94,11 +94,12 @@ SpellCheckResult AppleSpeller_check(AppleSpeller speller, const char * word, con
|
||||
NSString * lang_ = toString(lang);
|
||||
SpellCheckResult result = SPELL_CHECK_FAILED;
|
||||
int start = 0;
|
||||
|
||||
int length = [word_ length];
|
||||
|
||||
[speller->misspelled release];
|
||||
speller->misspelled = nil;
|
||||
|
||||
while (result == SPELL_CHECK_FAILED) {
|
||||
while (result == SPELL_CHECK_FAILED && start < length) {
|
||||
NSRange match = [speller->checker
|
||||
checkSpellingOfString:word_
|
||||
startingAt:start
|
||||
|
Loading…
Reference in New Issue
Block a user