This commit is contained in:
Morten Delenk 2016-07-28 14:32:09 +02:00
parent d1718281c3
commit 7638cb504d
No known key found for this signature in database
GPG key ID: 3F818D0F65DCB490

View file

@ -3,8 +3,8 @@
#include <textDISP.hpp>
extern "C" void __optimized_memcpy_impl(void *dest, const void* src, size_t n);
extern "C" void *memcpy(void *dest, const void *src, size_t n) {
unsigned long p1=(unsigned long)d;
unsigned long p2=(unsigned long)s;
unsigned long p1=(unsigned long)dest;
unsigned long p2=(unsigned long)src;
//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);