Skip to content

Commit

Permalink
Merge pull request #11 from earlephilhower/memmoveP_IRAM
Browse files Browse the repository at this point in the history
When moving IRAM->IRAM, use memmove not memcpy_P
  • Loading branch information
earlephilhower authored Aug 9, 2020
2 parents a2080b6 + 96d752a commit fc6534e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion newlib/libc/sys/xtensa/string_pgmspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void* memccpy_P(void* dest, PGM_VOID_P src, int c, size_t count)

void *memmove_P(void *dest, const void *src, size_t n)
{
if ((const char *)src >= (const char *)0x40000000)
if ( ((const char *)src >= (const char *)0x40000000) && ((const char *)dest < (const char *)0x40000000) )
return memcpy_P(dest, src, n);
else
return memmove(dest, src, n);
Expand Down

0 comments on commit fc6534e

Please sign in to comment.