src/driver/screenshot.cpp avoid memory ranges overlap

Origin commit data
------------------
Branch: ni/coolstream
Commit: d30bd0ea26
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2017-09-14 (Thu, 14 Sep 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2017-09-14 11:17:36 +02:00
parent ada6a1280a
commit aecad369c1

View File

@@ -393,7 +393,7 @@ bool CScreenShot::SaveJpg()
int xres2 = xres1+2;
for (int x = 0; x < xres; x++) {
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]);
}
}