From 83169494e31efb99d42269ac2790750ded7b5cc9 Mon Sep 17 00:00:00 2001
From: Vassil Vassilev <vvasilev@cern.ch>
Date: Fri, 15 Aug 2014 13:12:33 +0200
Subject: [PATCH] Break only if the condition is held.

---
 interpreter/cling/lib/MetaProcessor/InputValidator.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/interpreter/cling/lib/MetaProcessor/InputValidator.cpp b/interpreter/cling/lib/MetaProcessor/InputValidator.cpp
index 1c7a50d3471..36f708edaf9 100644
--- a/interpreter/cling/lib/MetaProcessor/InputValidator.cpp
+++ b/interpreter/cling/lib/MetaProcessor/InputValidator.cpp
@@ -32,12 +32,13 @@ namespace cling {
           if (Tok.getIdent().startswith("if")) {
             Res = kIncomplete;
             m_ParenStack.push(kind);
+            break;
           }
           else if (Tok.getIdent().startswith("end")) {
             assert(m_ParenStack.top() == kind && "No coresponding # to pop?");
             m_ParenStack.pop();
+            break;
           }
-          break;
         }
       }
 
-- 
GitLab