mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
screenshot.cpp fix memcpy param overlap
This commit is contained in:
@@ -268,7 +268,7 @@ bool CScreenShot::SaveJpg()
|
|||||||
int xres2 = xres1+2;
|
int xres2 = xres1+2;
|
||||||
for (int x = 0; x < xres; x++) {
|
for (int x = 0; x < xres; x++) {
|
||||||
int x2 = x*3;
|
int x2 = x*3;
|
||||||
memcpy(pixel_data + x2 + xres1, pixel_data + x*4 + y*xres*4, 3);
|
memmove(pixel_data + x2 + xres1, pixel_data + x*4 + y*xres*4, 3);
|
||||||
SWAP(pixel_data[x2 + xres1], pixel_data[x2 + xres2]);
|
SWAP(pixel_data[x2 + xres1], pixel_data[x2 + xres2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user