diff --git a/src/util/Vector.h b/src/util/Vector.h index e7d8a772c..d260ca65c 100644 --- a/src/util/Vector.h +++ b/src/util/Vector.h @@ -27,6 +27,10 @@ template struct VectorCopier { static void copy(T* dst, const T* src, const size_t size) { + if (UNLIKELY(size <= 0)) { + return; + } + memcpy(dst, src, sizeof(T) * size); } };