Add a check to fix picture_blit_pixels when width > orig_stride

This commit is contained in:
Laurent Fasnacht 2014-04-23 10:59:16 +02:00
parent b36e154c38
commit 985630b8b2

View file

@ -76,6 +76,8 @@ void picture_blit_pixels(const pixel *orig, pixel *dst,
unsigned orig_stride, unsigned dst_stride)
{
unsigned y, x;
//Fix problem with reading unitialized memory
if (width > orig_stride) width = orig_stride;
for (y = 0; y < height; ++y) {
for (x = 0; x < width; ++x) {