diff options
| author | nyamatongwe <unknown> | 2010-05-13 01:30:06 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2010-05-13 01:30:06 +0000 | 
| commit | 74d92c0f19f84c9f1f5f9e87130c89484db155f6 (patch) | |
| tree | 8eb24653968c21beb97ca0350c3c5fe854bb816e /src/LexConf.cxx | |
| parent | 9328c929f1e7259ec256f076eba0a47013a5fb62 (diff) | |
| download | scintilla-mirror-74d92c0f19f84c9f1f5f9e87130c89484db155f6.tar.gz | |
Fix debug assertions for bug #3000566.
Diffstat (limited to 'src/LexConf.cxx')
| -rw-r--r-- | src/LexConf.cxx | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/src/LexConf.cxx b/src/LexConf.cxx index 969275f92..7b066af7b 100644 --- a/src/LexConf.cxx +++ b/src/LexConf.cxx @@ -70,17 +70,17 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  				} else if( ch == '"') {  					state = SCE_CONF_STRING;  					styler.ColourTo(i,SCE_CONF_STRING); -				} else if( ispunct(ch) ) { +				} else if( isascii(ch) && ispunct(ch) ) {  					// signals an operator...  					// no state jump necessary for this  					// simple case...  					styler.ColourTo(i,SCE_CONF_OPERATOR); -				} else if( isalpha(ch) ) { +				} else if( isascii(ch) && isalpha(ch) ) {  					// signals the start of an identifier  					bufferCount = 0;  					buffer[bufferCount++] = static_cast<char>(tolower(ch));  					state = SCE_CONF_IDENTIFIER; -				} else if( isdigit(ch) ) { +				} else if( isascii(ch) && isdigit(ch) ) {  					// signals the start of a number  					bufferCount = 0;  					buffer[bufferCount++] = ch; @@ -107,7 +107,7 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  				// if we find a non-alphanumeric char,  				// we simply go to default state  				// else we're still dealing with an extension... -				if( isalnum(ch) || (ch == '_') || +				if( (isascii(ch) && isalnum(ch)) || (ch == '_') ||  					(ch == '-') || (ch == '$') ||  					(ch == '/') || (ch == '.') || (ch == '*') )  				{ @@ -129,7 +129,7 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  			case SCE_CONF_IDENTIFIER:  				// stay  in CONF_IDENTIFIER state until we find a non-alphanumeric -				if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) { +				if( (isascii(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) {  					buffer[bufferCount++] = static_cast<char>(tolower(ch));  				} else {  					state = SCE_CONF_DEFAULT; @@ -154,7 +154,7 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  			case SCE_CONF_NUMBER:  				// stay  in CONF_NUMBER state until we find a non-numeric -				if( isdigit(ch) || ch == '.') { +				if( (isascii(ch) && isdigit(ch)) || ch == '.') {  					buffer[bufferCount++] = ch;  				} else {  					state = SCE_CONF_DEFAULT; | 
