[embedded] Fix memmove for testing

This commit is contained in:
Kenta Kubo
2025-05-12 02:25:01 +09:00
parent 9b6c04e3c7
commit a4bdd08e0e

View File

@@ -81,7 +81,7 @@ int memcmp(const void *s1, const void *s2, size_t n) {
__attribute__((used))
void *memmove(void *dst, const void *src, size_t n) {
if ((uintptr_t)dst > (uintptr_t)src) {
if ((uintptr_t)dst < (uintptr_t)src) {
for (int i = 0; i < n; i++) {
((char *)dst)[i] = ((char *)src)[i];
}