aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexOpal.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-05-17 02:48:46 +0000
committernyamatongwe <devnull@localhost>2010-05-17 02:48:46 +0000
commit3a47e8beb8707195400b7d44d518a3ca7ec582bd (patch)
tree15b23e490091f50a587503fcd409ef72ca09b529 /src/LexOpal.cxx
parentb58ecc5340c78b08cbc15d62715001937f321c20 (diff)
downloadscintilla-mirror-3a47e8beb8707195400b7d44d518a3ca7ec582bd.tar.gz
Fix debug assertions for bug #3000566.
Diffstat (limited to 'src/LexOpal.cxx')
-rw-r--r--src/LexOpal.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/LexOpal.cxx b/src/LexOpal.cxx
index 221f95597..46cf43f7c 100644
--- a/src/LexOpal.cxx
+++ b/src/LexOpal.cxx
@@ -292,7 +292,7 @@ inline bool HandleInteger( unsigned int & cur, unsigned int one_too_much, Access
}
ch = styler.SafeGetCharAt( cur );
- if( !isdigit( ch ) )
+ if( !( isascii( ch ) && isdigit( ch ) ) )
{
styler.ColourTo( cur - 1, SCE_OPAL_INTEGER );
styler.StartSegment( cur );
@@ -311,7 +311,7 @@ inline bool HandleWord( unsigned int & cur, unsigned int one_too_much, Accessor
{
ch = styler.SafeGetCharAt( cur );
if( ( ch != '_' ) && ( ch != '-' ) &&
- !islower( ch ) && !isupper( ch ) && !isdigit( ch ) ) break;
+ !( isascii( ch ) && ( islower( ch ) || isupper( ch ) || isdigit( ch ) ) ) ) break;
cur++;
if( cur >= one_too_much )
@@ -487,13 +487,13 @@ static void ColouriseOpalDoc( unsigned int startPos, int length, int initStyle,
default:
{
// Integer
- if( isdigit( ch ) )
+ if( isascii( ch ) && isdigit( ch ) )
{
if( !HandleInteger( cur, one_too_much, styler ) ) return;
}
// Keyword
- else if( islower( ch ) || isupper( ch ) )
+ else if( isascii( ch ) && ( islower( ch ) || isupper( ch ) ) )
{
if( !HandleWord( cur, one_too_much, styler, keywordlists ) ) return;