dont overrun mask buffers!

SVN revision: 30315
This commit is contained in:
Carsten Haitzler 2007-06-12 13:12:17 +00:00
parent 6cf964cbe1
commit d9d4d5ee8e
2 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,7 @@ evas_software_x11_x_write_mask_line(Outbuf *buf, X_Output_Buffer *xob, DATA32 *s
src_ptr = src;
dst_ptr = evas_software_x11_x_output_buffer_data(xob, &bpl);
dst_ptr = dst_ptr + (bpl * y);
w -= 7;
if (buf->priv.x.bit_swap)
{
for (x = 0; x < w; x += 8)
@ -48,6 +49,7 @@ evas_software_x11_x_write_mask_line(Outbuf *buf, X_Output_Buffer *xob, DATA32 *s
dst_ptr++;
}
}
w += 7;
for (; x < w; x ++)
{
XPutPixel(xob->xim, x, y, A_VAL(src_ptr) >> 7);

View File

@ -18,6 +18,7 @@ evas_software_xcb_x_write_mask_line(Outbuf *buf,
src_ptr = src;
dst_ptr = evas_software_xcb_x_output_buffer_data(xcbob, &bpl);
dst_ptr = dst_ptr + (bpl * y);
w -= 7;
if (buf->priv.x.bit_swap)
{
for (x = 0; x < w; x += 8)
@ -52,6 +53,7 @@ evas_software_xcb_x_write_mask_line(Outbuf *buf,
dst_ptr++;
}
}
w += 7;
for (; x < w; x ++)
{
xcb_image_put_pixel(xcbob->image, x, y, A_VAL(src_ptr) >> 7);