diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index b35441d52e..b40a54cac0 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -541,7 +541,11 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLW } // Skip white space - while( *cur && isspace(*cur) && (*cur != '\n') ) + + // use iswspace in case *cur > 0xFF + // while( *cur && isspace(*cur) && (*cur != '\n') ) + while( *cur && iswspace(*cur) && (*cur != '\n') ) + // { cur++; } @@ -584,7 +588,11 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLW } // Skip white space - while( *cur && isspace(*cur) && (*cur != '\n') ) + + // use iswspace in case *cur > 0xFF + // while( *cur && isspace(*cur) && (*cur != '\n') ) + while( *cur && iswspace(*cur) && (*cur != '\n') ) + // { cur++; } @@ -692,10 +700,10 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLW // check against words llwchar prev = cur > base ? *(cur-1) : 0; // NaCl - LSL Preprocessor - if( !isalnum( prev ) && (prev != '_') && (prev != '#')) + if( !iswalnum( prev ) && (prev != '_') && (prev != '#')) { const llwchar* p = cur; - while( isalnum( *p ) || (*p == '_') || (*p == '#') ) + while( *p && ( iswalnum( *p ) || (*p == '_') || (*p == '#') ) ) // NaCl End { p++;