libluna: Fix memmove when dest > src
Really? A crucial component of the libc was broken? No wonder some ports did not work very well...
This commit is contained in:
parent
1070c85922
commit
644614cdd8
@ -51,7 +51,7 @@ extern "C"
|
||||
{
|
||||
if (dest == src) return dest;
|
||||
if (dest > src)
|
||||
for (long i = (long)n - 1; i >= 0; i++) { *((u8*)dest + i) = *((const u8*)src + i); }
|
||||
for (long i = (long)n - 1; i >= 0; i--) { *((u8*)dest + i) = *((const u8*)src + i); }
|
||||
else
|
||||
for (long i = 0; i < (long)n; i++) { *((u8*)dest + i) = *((const u8*)src + i); }
|
||||
return dest;
|
||||
|
Loading…
Reference in New Issue
Block a user