summaryrefslogtreecommitdiff
path: root/libcxxabi
diff options
context:
space:
mode:
Diffstat (limited to 'libcxxabi')
-rw-r--r--libcxxabi/src/demangle/Utility.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxxabi/src/demangle/Utility.h b/libcxxabi/src/demangle/Utility.h
index 511983ad40f7..8829f3fa13a9 100644
--- a/libcxxabi/src/demangle/Utility.h
+++ b/libcxxabi/src/demangle/Utility.h
@@ -136,6 +136,8 @@ public:
OutputBuffer &prepend(std::string_view R) {
size_t Size = R.size();
+ if (!Size)
+ return *this;
grow(Size);
std::memmove(Buffer + Size, Buffer, CurrentPosition);