The new expression evaluator functions that were backported from L4D2 and Swarm crash when trying to get or set a global conditional.

Here's some test code that sets the following conditionals and verifies them:
#include <vstdlib/IKeyValuesSystem.h>
KeyValuesSystem()->SetKeyValuesExpressionSymbol( "TEST1", true );
KeyValuesSystem()->SetKeyValuesExpressionSymbol( "TEST2", true ); // <-- Crashes here
KeyValuesSystem()->SetKeyValuesExpressionSymbol( "TEST3", false );
KeyValuesSystem()->SetKeyValuesExpressionSymbol( "TEST4", false );
Assert( KeyValuesSystem()->GetKeyValuesExpressionSymbol( "TEST1" ) );
Assert( KeyValuesSystem()->GetKeyValuesExpressionSymbol( "TEST2" ) );
Assert( !KeyValuesSystem()->GetKeyValuesExpressionSymbol( "TEST3" ) );
Assert( !KeyValuesSystem()->GetKeyValuesExpressionSymbol( "TEST4" ) );
And then uses the expression evaluator to determine if TEST1 is true and TEST3 is false:
#include <tier1/exprevaluator.h>
CExpressionEvaluator exprEval;
bool result;
exprEval.Evaluate( result, "$TEST1 && !$TEST3" ); // <-- Crashes when calling GetKeyValuesExpressionSymbol() inside this func
Assert( result );
Works fine in other branches. I'm also wondering why this was backported and not being used by KeyValues to replace the old EvaluateConditional function, like in other branches, or anywhere else in the SDK.
The new expression evaluator functions that were backported from L4D2 and Swarm crash when trying to get or set a global conditional.
Here's some test code that sets the following conditionals and verifies them:
And then uses the expression evaluator to determine if
TEST1is true andTEST3is false:Works fine in other branches. I'm also wondering why this was backported and not being used by
KeyValuesto replace the oldEvaluateConditionalfunction, like in other branches, or anywhere else in the SDK.