From b61b732207e9ec5e48023987e368156375916b57 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Mon, 9 Nov 2015 09:07:18 +0100 Subject: [PATCH] fixed an interference with script warning mode and error downgrading (Fixes #2990) --- components/compiler/errorhandler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/compiler/errorhandler.cpp b/components/compiler/errorhandler.cpp index a987a86da..7f02255db 100644 --- a/components/compiler/errorhandler.cpp +++ b/components/compiler/errorhandler.cpp @@ -32,7 +32,10 @@ namespace Compiler void ErrorHandler::warning (const std::string& message, const TokenLoc& loc) { - if (mWarningsMode==1) + if (mWarningsMode==1 || + // temporarily change from mode 2 to mode 1 if error downgrading is enabled to + // avoid infinite recursion + (mWarningsMode==2 && mDowngradeErrors)) { ++mWarnings; report (message, loc, WarningMessage);