Fix entity name matching not working properly

This commit is contained in:
TotallyMehis 2020-06-22 15:30:26 +03:00
parent 0d8dceea43
commit e7227518d5
2 changed files with 4 additions and 4 deletions

View File

@ -2991,9 +2991,9 @@ FORCEINLINE bool NamesMatch( const char *pszQuery, string_t nameToMatch )
// simple ascii case conversion // simple ascii case conversion
if ( cName == cQuery ) if ( cName == cQuery )
; ;
else if ( cName - 'A' <= (unsigned char)'Z' - 'A' && cName - 'A' + 'a' == cQuery ) else if ( (unsigned char)(cName - 'A') <= (unsigned char)('Z' - 'A') && (unsigned char)(cName - 'A' + 'a') == cQuery )
; ;
else if ( cName - 'a' <= (unsigned char)'z' - 'a' && cName - 'a' + 'A' == cQuery ) else if ( (unsigned char)(cName - 'a') <= (unsigned char)('z' - 'a') && (unsigned char)(cName - 'a' + 'A') == cQuery )
; ;
else else
break; break;

View File

@ -2987,9 +2987,9 @@ FORCEINLINE bool NamesMatch( const char *pszQuery, string_t nameToMatch )
// simple ascii case conversion // simple ascii case conversion
if ( cName == cQuery ) if ( cName == cQuery )
; ;
else if ( cName - 'A' <= (unsigned char)'Z' - 'A' && cName - 'A' + 'a' == cQuery ) else if ( (unsigned char)(cName - 'A') <= (unsigned char)('Z' - 'A') && (unsigned char)(cName - 'A' + 'a') == cQuery )
; ;
else if ( cName - 'a' <= (unsigned char)'z' - 'a' && cName - 'a' + 'A' == cQuery ) else if ( (unsigned char)(cName - 'a') <= (unsigned char)('z' - 'a') && (unsigned char)(cName - 'a' + 'A') == cQuery )
; ;
else else
break; break;