strip HTML colors so Lua doesn't choke

This commit is contained in:
Chris Danford
2004-11-06 18:56:39 +00:00
parent 0f7a5c873d
commit e2a537668a
+3
View File
@@ -190,6 +190,9 @@ void Lua::PrepareExpression( CString &sInOut )
// Replace them with Lua-style comments. // Replace them with Lua-style comments.
sInOut.Replace( "//", "--" ); sInOut.Replace( "//", "--" );
// comment out HTML style color values
sInOut.Replace( "#", "--" );
// Remove leading +, eg. "+50"; Lua doesn't handle that. // Remove leading +, eg. "+50"; Lua doesn't handle that.
if( sInOut.size() >= 1 && sInOut[0] == '+' ) if( sInOut.size() >= 1 && sInOut[0] == '+' )
sInOut.erase( 0, 1 ); sInOut.erase( 0, 1 );