mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2024-12-31 01:05:33 +03:00
Fix entity name matching not working properly
This commit is contained in:
parent
0d8dceea43
commit
e7227518d5
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user