@@ -2780,12 +2780,12 @@ scroll_repeat(int h, int dx, int dy, int pitch, int span, int xoffset,
27802780 while (h -- ) {
27812781 if (dx > 0 ) {
27822782 memcpy (tempbuf , linesrc + span - xoffset , xoffset );
2783- memcpy (linesrc + xoffset , linesrc , span - xoffset );
2783+ memmove (linesrc + xoffset , linesrc , span - xoffset );
27842784 memcpy (linesrc , tempbuf , xoffset );
27852785 }
27862786 else if (dx < 0 ) {
27872787 memcpy (tempbuf , linesrc , - xoffset );
2788- memcpy (linesrc , linesrc - xoffset , span + xoffset );
2788+ memmove (linesrc , linesrc - xoffset , span + xoffset );
27892789 memcpy (linesrc + span + xoffset , tempbuf , - xoffset );
27902790 }
27912791 linesrc += pitch ;
@@ -2835,13 +2835,13 @@ scroll_default(int h, int dx, int dy, int pitch, int span, int xoffset,
28352835 // No y-shifting, we only need to move pixels on the same line
28362836 while (h -- ) {
28372837 if (dx > 0 ) {
2838- memcpy (linesrc + xoffset , linesrc , span - xoffset );
2838+ memmove (linesrc + xoffset , linesrc , span - xoffset );
28392839 if (erase ) {
28402840 memset (linesrc , 0 , xoffset );
28412841 }
28422842 }
28432843 else if (dx < 0 ) {
2844- memcpy (linesrc , linesrc - xoffset , span + xoffset );
2844+ memmove (linesrc , linesrc - xoffset , span + xoffset );
28452845 if (erase ) {
28462846 memset (linesrc + span + xoffset , 0 , - xoffset );
28472847 }
0 commit comments