@@ -2780,12 +2780,12 @@ scroll_repeat(int h, int dx, int dy, int pitch, int span, int xoffset,
2780
2780
while (h -- ) {
2781
2781
if (dx > 0 ) {
2782
2782
memcpy (tempbuf , linesrc + span - xoffset , xoffset );
2783
- memcpy (linesrc + xoffset , linesrc , span - xoffset );
2783
+ memmove (linesrc + xoffset , linesrc , span - xoffset );
2784
2784
memcpy (linesrc , tempbuf , xoffset );
2785
2785
}
2786
2786
else if (dx < 0 ) {
2787
2787
memcpy (tempbuf , linesrc , - xoffset );
2788
- memcpy (linesrc , linesrc - xoffset , span + xoffset );
2788
+ memmove (linesrc , linesrc - xoffset , span + xoffset );
2789
2789
memcpy (linesrc + span + xoffset , tempbuf , - xoffset );
2790
2790
}
2791
2791
linesrc += pitch ;
@@ -2835,13 +2835,13 @@ scroll_default(int h, int dx, int dy, int pitch, int span, int xoffset,
2835
2835
// No y-shifting, we only need to move pixels on the same line
2836
2836
while (h -- ) {
2837
2837
if (dx > 0 ) {
2838
- memcpy (linesrc + xoffset , linesrc , span - xoffset );
2838
+ memmove (linesrc + xoffset , linesrc , span - xoffset );
2839
2839
if (erase ) {
2840
2840
memset (linesrc , 0 , xoffset );
2841
2841
}
2842
2842
}
2843
2843
else if (dx < 0 ) {
2844
- memcpy (linesrc , linesrc - xoffset , span + xoffset );
2844
+ memmove (linesrc , linesrc - xoffset , span + xoffset );
2845
2845
if (erase ) {
2846
2846
memset (linesrc + span + xoffset , 0 , - xoffset );
2847
2847
}
0 commit comments