From f7b47df1865974e7c43469e1d9b41681b0cb14fb Mon Sep 17 00:00:00 2001
From: Frederich Munch <marsupial@users.noreply.github.com>
Date: Wed, 25 Jan 2017 03:16:08 -0500
Subject: [PATCH] Fix assertion test for null terminated string.

---
 interpreter/cling/lib/Utils/PlatformPosix.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interpreter/cling/lib/Utils/PlatformPosix.cpp b/interpreter/cling/lib/Utils/PlatformPosix.cpp
index 61d2e518f37..0db9e12d17f 100644
--- a/interpreter/cling/lib/Utils/PlatformPosix.cpp
+++ b/interpreter/cling/lib/Utils/PlatformPosix.cpp
@@ -209,7 +209,7 @@ std::string Demangle(const std::string& Symbol) {
   int status = 0;
   size_t len;
   AutoFree af(abi::__cxa_demangle(Symbol.c_str(), 0, &len, &status));
-  assert(((len && af.Str[len-1]==0) || status != 0) && "Not null terminated");
+  assert((status != 0 || (len && af.Str[len-1]==0)) && "Not null terminated");
   return status == 0 ? std::string(af.Str, len-1) : std::string();
 }
 
-- 
GitLab