Skip to content

Commit 0dce0ea

Browse files
authored
[ItaniumDemangle] Fix libcxxabi OutputBuffer::prepend for empty inputs (#138656)
See #138564 for details.
1 parent fd80048 commit 0dce0ea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libcxxabi/src/demangle/Utility.h

+2
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ class OutputBuffer {
136136

137137
OutputBuffer &prepend(std::string_view R) {
138138
size_t Size = R.size();
139+
if (!Size)
140+
return *this;
139141

140142
grow(Size);
141143
std::memmove(Buffer + Size, Buffer, CurrentPosition);

0 commit comments

Comments
 (0)