@@ -2782,12 +2782,12 @@ scroll_repeat(int h, int dx, int dy, int pitch, int span, int xoffset,
27822782 while (h -- ) {
27832783 if (dx > 0 ) {
27842784 memcpy (tempbuf , linesrc + span - xoffset , xoffset );
2785- memcpy (linesrc + xoffset , linesrc , span - xoffset );
2785+ memmove (linesrc + xoffset , linesrc , span - xoffset );
27862786 memcpy (linesrc , tempbuf , xoffset );
27872787 }
27882788 else if (dx < 0 ) {
27892789 memcpy (tempbuf , linesrc , - xoffset );
2790- memcpy (linesrc , linesrc - xoffset , span + xoffset );
2790+ memmove (linesrc , linesrc - xoffset , span + xoffset );
27912791 memcpy (linesrc + span + xoffset , tempbuf , - xoffset );
27922792 }
27932793 linesrc += pitch ;
@@ -2837,13 +2837,13 @@ scroll_default(int h, int dx, int dy, int pitch, int span, int xoffset,
28372837 // No y-shifting, we only need to move pixels on the same line
28382838 while (h -- ) {
28392839 if (dx > 0 ) {
2840- memcpy (linesrc + xoffset , linesrc , span - xoffset );
2840+ memmove (linesrc + xoffset , linesrc , span - xoffset );
28412841 if (erase ) {
28422842 memset (linesrc , 0 , xoffset );
28432843 }
28442844 }
28452845 else if (dx < 0 ) {
2846- memcpy (linesrc , linesrc - xoffset , span + xoffset );
2846+ memmove (linesrc , linesrc - xoffset , span + xoffset );
28472847 if (erase ) {
28482848 memset (linesrc + span + xoffset , 0 , - xoffset );
28492849 }
0 commit comments