[ft] Fix memory bug in copying bitmaps

This commit is contained in:
Behdad Esfahbod 2013-07-05 15:12:14 -06:00
parent 9f9796920f
commit a0f556f37f

View file

@ -1158,9 +1158,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap,
source = bitmap->buffer;
dest = data;
for (i = height; i; i--) {
memcpy (dest, source, bitmap->pitch);
memset (dest + bitmap->pitch, '\0', stride - bitmap->pitch);
memcpy (dest, source, stride);
source += bitmap->pitch;
dest += stride;
}