[MicrosoftDemangle] Set error to true when returning nullptr.

This commit is contained in:
Zequan Wu 2022-06-08 17:08:22 -07:00
parent 44978a234b
commit bf1e96d620
1 changed files with 6 additions and 2 deletions

View File

@ -823,11 +823,15 @@ SymbolNode *Demangler::parse(StringView &MangledName) {
}
TagTypeNode *Demangler::parseTagUniqueName(StringView &MangledName) {
if (!MangledName.consumeFront(".?A"))
if (!MangledName.consumeFront(".?A")) {
Error = true;
return nullptr;
}
MangledName.consumeFront(".?A");
if (MangledName.empty())
if (MangledName.empty()) {
Error = true;
return nullptr;
}
return demangleClassType(MangledName);
}