Fixed two issues in the response system

This commit is contained in:
Blixibon 2022-04-26 08:39:12 -05:00
parent 714c89cc49
commit e22bbc97fb
2 changed files with 20 additions and 1 deletions

View File

@ -1985,7 +1985,14 @@ void CResponseSystem::ParseResponse( void )
while ( 1 ) while ( 1 )
{ {
#ifdef MAPBASE
if ( !ParseToken() || !Q_stricmp( token, "}" ) )
{
break;
}
#else
ParseToken(); ParseToken();
#endif
unsigned int hash = RR_HASH( token ); unsigned int hash = RR_HASH( token );
@ -2048,7 +2055,14 @@ int CResponseSystem::ParseOneCriterion( const char *criterionName )
while ( TokenWaiting() || !gotbody ) while ( TokenWaiting() || !gotbody )
{ {
#ifdef MAPBASE
if ( !ParseToken() )
{
break;
}
#else
ParseToken(); ParseToken();
#endif
// Oops, part of next definition // Oops, part of next definition
if( IsRootCommand() ) if( IsRootCommand() )

View File

@ -8,6 +8,7 @@
#include "rrbase.h" #include "rrbase.h"
#ifdef MAPBASE #ifdef MAPBASE
#include "convar.h" #include "convar.h"
#include "mapbase_matchers_base.h"
#endif #endif
// memdbgon must be the last include file in a .cpp file!!! // memdbgon must be the last include file in a .cpp file!!!
@ -117,7 +118,11 @@ static inline bool CanBucketBySubject( const char * RESTRICT pszSubject )
{ {
return pszSubject && return pszSubject &&
( ( pszSubject[0] >= 'A' && pszSubject[0] <= 'Z' ) || ( ( pszSubject[0] >= 'A' && pszSubject[0] <= 'Z' ) ||
( pszSubject[0] >= 'a' && pszSubject[0] <= 'z' ) ); ( pszSubject[0] >= 'a' && pszSubject[0] <= 'z' ) )
#ifdef MAPBASE
&& !Matcher_ContainsWildcard( pszSubject )
#endif
;
} }
ResponseRulePartition::tRuleDict &ResponseRulePartition::GetDictForRule( CResponseSystem *pSystem, Rule *pRule ) ResponseRulePartition::tRuleDict &ResponseRulePartition::GetDictForRule( CResponseSystem *pSystem, Rule *pRule )