From ed7256ac0c47857cd83e96d953571c47add68a6c Mon Sep 17 00:00:00 2001
From: Charles Krinke
Date: Wed, 25 Feb 2009 04:29:02 +0000
Subject: Fixes Mantis #3187. Thank you kindly, DoranZemlja for a patch that:
 Deals with the multiple warning side affect introduced earlier.

---
 OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | 1 +
 OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs        | 1 +
 2 files changed, 2 insertions(+)

(limited to 'OpenSim/Region')

diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
index 880ba4a..bf97d5f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
@@ -87,6 +87,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
         /// <returns>String containing the generated C# code.</returns>
         public string Convert(string script)
         {
+            m_warnings.Clear();
             ResetCounters();
             Parser p = new LSLSyntax(new yyLSLSyntax(), new ErrorHandler(true));
             // Obviously this needs to be in a try/except block.
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index 5b851f6..5d5e3c5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -261,6 +261,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
         public string PerformScriptCompile(string Script, string asset)
         {
             m_positionMap = null;
+            m_warnings.Clear();
                 
             string OutFile = Path.Combine(ScriptEnginesPath, Path.Combine(
                     m_scriptEngine.World.RegionInfo.RegionID.ToString(),
-- 
cgit v1.1