aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-02 00:03:16 +0000
committerMelanie Thielker2008-09-02 00:03:16 +0000
commit146f469524d16fa5d881122092efc9fe9d37d47e (patch)
treea9c023dac76cc0c181e0edcd536393a0a71906b3
parentThank you, Ewe Loon, for a patch that fixes various aspects of (diff)
downloadopensim-SC_OLD-146f469524d16fa5d881122092efc9fe9d37d47e.zip
opensim-SC_OLD-146f469524d16fa5d881122092efc9fe9d37d47e.tar.gz
opensim-SC_OLD-146f469524d16fa5d881122092efc9fe9d37d47e.tar.bz2
opensim-SC_OLD-146f469524d16fa5d881122092efc9fe9d37d47e.tar.xz
Add an explicit cast to bool for the if expression so that any base types
that slip in will not cause it to break
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
index b357ab6..c8d1d16 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
@@ -470,9 +470,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
470 { 470 {
471 string retstr = String.Empty; 471 string retstr = String.Empty;
472 472
473 retstr += GenerateIndented("if (", ifs); 473 retstr += GenerateIndented("if ((bool)(", ifs);
474 retstr += GenerateNode((SYMBOL) ifs.kids.Pop()); 474 retstr += GenerateNode((SYMBOL) ifs.kids.Pop());
475 retstr += GenerateLine(")"); 475 retstr += GenerateLine("))");
476 476
477 // CompoundStatement handles indentation itself but we need to do it 477 // CompoundStatement handles indentation itself but we need to do it
478 // otherwise. 478 // otherwise.