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