diff --git a/src/common/language.cc b/src/common/language.cc index 3a598f69..087395e9 100644 --- a/src/common/language.cc +++ b/src/common/language.cc @@ -82,10 +82,10 @@ class CPPLanguage: public Language { DemangleResult result; if (status == 0) { result = kDemangleSuccess; - demangled->clear(); + demangled->assign(demangled_c); } else { result = kDemangleFailure; - demangled->assign(demangled_c); + demangled->clear(); } if (demangled_c) {