parent
6808bc0f45
commit
966c180ad2
|
@ -352,7 +352,7 @@ __cxa_demangle(const char *MangledName, char *Buf, size_t *N, int *Status) {
|
|||
|
||||
if (AST == nullptr)
|
||||
InternalStatus = demangle_invalid_mangled_name;
|
||||
else if (initializeOutputStream(Buf, N, S, 1024))
|
||||
else if (!initializeOutputStream(Buf, N, S, 1024))
|
||||
InternalStatus = demangle_memory_alloc_failure;
|
||||
else {
|
||||
assert(Parser.ForwardTemplateRefs.empty());
|
||||
|
|
|
@ -176,13 +176,13 @@ inline bool initializeOutputStream(char *Buf, size_t *N, OutputStream &S,
|
|||
if (Buf == nullptr) {
|
||||
Buf = static_cast<char *>(std::malloc(InitSize));
|
||||
if (Buf == nullptr)
|
||||
return true;
|
||||
return false;
|
||||
BufferSize = InitSize;
|
||||
} else
|
||||
BufferSize = *N;
|
||||
|
||||
S.reset(Buf, BufferSize);
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Reference in New Issue