From 6bc725e466fe5e8ff2f8fe0f675db6f1bd997bf7 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Thu, 13 Jul 2006 08:10:30 +0000 Subject: [PATCH] Bug 343741. Don't pass Unicode characters to isspace etc libc methods, they die on Windows. r+sr=mscott git-svn-id: svn://10.0.0.236/trunk@202000 18797224-902f-48f8-a5cc-f745e15eee43 --- .../extensions/spellcheck/src/mozInlineSpellWordUtil.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mozilla/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp b/mozilla/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp index 56e8890f1d6..c0a8091ddff 100644 --- a/mozilla/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp +++ b/mozilla/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp @@ -832,6 +832,12 @@ WordSplitState::ClassifyCharacter(PRInt32 aIndex, PRBool aRecurse) const if (charCategory == 5 || IsIgnorableCharacter(mDOMWordText[aIndex])) return CHAR_CLASS_WORD; + if (mDOMWordText[aIndex] > 255) { + // Non-ASCII character so we can't use is* libc functions. + // XXX this function needs work to handle general Unicode characters!!! + return CHAR_CLASS_WORD; + } + // all other whitespace chars, control chars, and most punctuation (with // several exceptions) are word separators. These exceptions are for // characters that can be considered part of a word if it is surrounded by