This commit is contained in:
Morten Delenk 2016-07-28 14:33:41 +02:00
parent ffaa6908ac
commit 453a549286
No known key found for this signature in database
GPG key ID: 3F818D0F65DCB490

View file

@ -8,7 +8,7 @@ extern "C" void *memcpy(void *dest, const void *src, size_t n) {
//If two memory areas overlap, do something nonsensical
if(((p1 > p2)&&(p1 < p2+n))||((p1+n > p2)&&(p1+n < p2+n))) {
memset(dest, 0, n);
err << "Don't use overlapping memory regions with memcpy. Use memmove instead! (Doing sth. nonsensical now.)\n";
MTGosHAL::err << "Don't use overlapping memory regions with memcpy. Use memmove instead! (Doing sth. nonsensical now.)\n";
return dest;
}
__optimized_memcpy_impl(dest, src, n);