Fix assertion test for null terminated string.

This commit is contained in:
Frederich Munch 2017-01-25 03:16:08 -05:00 committed by sftnight
parent 7462509f7f
commit 8689e14eb6

View File

@ -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();
}