Fix assertion test for null terminated string.
This commit is contained in:
parent
7462509f7f
commit
8689e14eb6
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user