1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Don't copy more memory than we own

This commit is contained in:
Michał Janiszewski
2015-10-09 17:02:45 +02:00
parent 33655afcf9
commit 6dd04bbb1a

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));
}