From 7638cb504df7e3cf6b4a368e11ecb92531307105 Mon Sep 17 00:00:00 2001 From: Morten Delenk Date: Thu, 28 Jul 2016 14:32:09 +0200 Subject: [PATCH] stupid --- string/mem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/string/mem.cpp b/string/mem.cpp index ea83e81..81a1986 100644 --- a/string/mem.cpp +++ b/string/mem.cpp @@ -3,8 +3,8 @@ #include 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);