]> git.lyx.org Git - lyx.git/blobdiff - src/support/AppleSpeller.m
InsetTabular.cpp: fix #6585 also for wrapped floats - thanks Vincent
[lyx.git] / src / support / AppleSpeller.m
index feba78c1a1b4b55cfee4509d20e24390b9c47153..aecb787551aa6440276e8c2703359fdb1932b823 100644 (file)
@@ -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