Add an explicit cast to bool for the if expression so that any base types
that slip in will not cause it to break0.6.0-stable
parent
0e7bac07f6
commit
146f469524
|
@ -470,9 +470,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
|||
{
|
||||
string retstr = String.Empty;
|
||||
|
||||
retstr += GenerateIndented("if (", ifs);
|
||||
retstr += GenerateIndented("if ((bool)(", ifs);
|
||||
retstr += GenerateNode((SYMBOL) ifs.kids.Pop());
|
||||
retstr += GenerateLine(")");
|
||||
retstr += GenerateLine("))");
|
||||
|
||||
// CompoundStatement handles indentation itself but we need to do it
|
||||
// otherwise.
|
||||
|
|
Loading…
Reference in New Issue