From 8689e14eb6e62c2a1f1f0f11f79e9557b3a6427e Mon Sep 17 00:00:00 2001 From: Frederich Munch Date: Wed, 25 Jan 2017 03:16:08 -0500 Subject: [PATCH] Fix assertion test for null terminated string. --- lib/Utils/PlatformPosix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Utils/PlatformPosix.cpp b/lib/Utils/PlatformPosix.cpp index 61d2e518..0db9e12d 100644 --- a/lib/Utils/PlatformPosix.cpp +++ b/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(); }