strip invalid characters when evaluating Actor command parameters

This commit is contained in:
Chris Danford
2004-11-06 06:00:58 +00:00
parent 4b29db0667
commit 7e17fd9615
4 changed files with 19 additions and 10 deletions
+3 -1
View File
@@ -17,7 +17,9 @@ void IncorrectActorParametersWarning( const ParsedCommand &command, int iMaxInde
void ParsedCommandToken::Set( const CString &sParam )
{
s = sParam;
f = Lua::RunExpressionF( sParam );
CString s = sParam;
Lua::PrepareExpression( s ); // strip invalid chars
f = Lua::RunExpressionF( s );
bColorIsValid = c.FromString( sParam );
}