diff options
author | Melanie Thielker | 2008-09-02 00:03:16 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-02 00:03:16 +0000 |
commit | 146f469524d16fa5d881122092efc9fe9d37d47e (patch) | |
tree | a9c023dac76cc0c181e0edcd536393a0a71906b3 /OpenSim/Region/ScriptEngine/Shared | |
parent | Thank you, Ewe Loon, for a patch that fixes various aspects of (diff) | |
download | opensim-SC-146f469524d16fa5d881122092efc9fe9d37d47e.zip opensim-SC-146f469524d16fa5d881122092efc9fe9d37d47e.tar.gz opensim-SC-146f469524d16fa5d881122092efc9fe9d37d47e.tar.bz2 opensim-SC-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
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | 4 |
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. |