bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14345: 24.3; shr-insert-document crashes gtk-emacs


From: Glenn Morris
Subject: bug#14345: 24.3; shr-insert-document crashes gtk-emacs
Date: Tue, 07 May 2013 21:33:40 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Maybe this fixes it:

*** src/image.c 2013-04-07 04:41:19 +0000
--- src/image.c 2013-05-08 01:25:15 +0000
***************
*** 7273,7292 ****
    /* Clear the part of the screen image not covered by the image.
       Full animated GIF support requires more here (see the gif89 spec,
       disposal methods).  Let's simply assume that the part not covered
!      by a sub-image is in the frame's background color.  */
!   for (y = 0; y < img->corners[TOP_CORNER]; ++y)
      for (x = 0; x < width; ++x)
        XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f));
  
!   for (y = img->corners[BOT_CORNER]; y < height; ++y)
      for (x = 0; x < width; ++x)
        XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f));
  
!   for (y = img->corners[TOP_CORNER]; y < img->corners[BOT_CORNER]; ++y)
      {
!       for (x = 0; x < img->corners[LEFT_CORNER]; ++x)
        XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f));
!       for (x = img->corners[RIGHT_CORNER]; x < width; ++x)
        XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f));
      }
  
--- 7273,7297 ----
    /* Clear the part of the screen image not covered by the image.
       Full animated GIF support requires more here (see the gif89 spec,
       disposal methods).  Let's simply assume that the part not covered
!      by a sub-image is in the frame's background color.
! 
!      Note that the corner position can be outside the screen, so take
!      care not to go beyond the screen boundary (bug#14345).
!   */
!   for (y = 0; y < min (height, img->corners[TOP_CORNER]); ++y)
      for (x = 0; x < width; ++x)
        XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f));
  
!   for (y = max (0, img->corners[BOT_CORNER]); y < height; ++y)
      for (x = 0; x < width; ++x)
        XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f));
  
!   for (y = max (0, img->corners[TOP_CORNER]);
!        min (height, y < img->corners[BOT_CORNER]); ++y)
      {
!       for (x = 0; x < min (width, img->corners[LEFT_CORNER]); ++x)
        XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f));
!       for (x = max (0, img->corners[RIGHT_CORNER]); x < width; ++x)
        XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f));
      }
  






reply via email to

[Prev in Thread] Current Thread [Next in Thread]