Don't copy more memory than we own

This commit is contained in:
Michał Janiszewski committed 2015-10-09 20:19:34 +02:00
1 parent 33655afcf9
commit 6dd04bbb1a
1 file changed
-1
-1
View File
@@ -48,7 +48,6 @@ namespace Memory {
template<typename T>
T *CopyArray(T *dst, const T *src, size_t count) {
count *= sizeof(T);
if (count == 0) return (T*)dst;
return (T*)memcpy((void*)dst, (const void*)src, count * sizeof(T));
}