screenshot.cpp fix memcpy param overlap

Origin commit data
------------------
Commit: 142ac1392f
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2017-03-15 (Wed, 15 Mar 2017)
This commit is contained in:
Jacek Jendrzej
2017-03-15 19:02:44 +01:00
parent 7764d7d1c3
commit 41b7873147

View File

@@ -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]);
} }
} }