diff --git a/common/dsnlexer.cpp b/common/dsnlexer.cpp index 883a85db38..f49d9ec0c7 100644 --- a/common/dsnlexer.cpp +++ b/common/dsnlexer.cpp @@ -375,7 +375,9 @@ int DSNLEXER::NeedNUMBER( const char* aExpectation ) throw( IO_ERROR ) */ static bool isSpace( int cc ) { - if( cc <= ' ' ) + // cc was signed extended from signed char, so it is often negative. + // Treat negative as large positive to exclude rapidly. + if( unsigned( cc ) <= ' ' ) { switch( cc ) {