r10613 tlsa - in /trunk/libnsfb/src/plot: 16bpp.c 32bpp.c 8bpp.c

netsurf at semichrome.net netsurf at semichrome.net
Thu Jul 8 18:23:46 BST 2010


Author: tlsa
Date: Thu Jul  8 12:23:46 2010
New Revision: 10613

URL: http://source.netsurf-browser.org?rev=10613&view=rev
Log:
Don't try to plot bitmaps at 0 width or height.

Modified:
    trunk/libnsfb/src/plot/16bpp.c
    trunk/libnsfb/src/plot/32bpp.c
    trunk/libnsfb/src/plot/8bpp.c

Modified: trunk/libnsfb/src/plot/16bpp.c
URL: http://source.netsurf-browser.org/trunk/libnsfb/src/plot/16bpp.c?rev=10613&r1=10612&r2=10613&view=diff
==============================================================================
--- trunk/libnsfb/src/plot/16bpp.c (original)
+++ trunk/libnsfb/src/plot/16bpp.c Thu Jul  8 12:23:46 2010
@@ -473,6 +473,9 @@
         int height = loc->y1 - loc->y0;
         nsfb_bbox_t clipped; /* clipped display */
 
+	if (width == 0 || height == 0)
+		return true;
+
         /* Scaled bitmaps are handled by a separate function */
         if (width != bmp_width || height != bmp_height)
                 return bitmap_scaled(nsfb, loc, pixel, bmp_width, bmp_height,

Modified: trunk/libnsfb/src/plot/32bpp.c
URL: http://source.netsurf-browser.org/trunk/libnsfb/src/plot/32bpp.c?rev=10613&r1=10612&r2=10613&view=diff
==============================================================================
--- trunk/libnsfb/src/plot/32bpp.c (original)
+++ trunk/libnsfb/src/plot/32bpp.c Thu Jul  8 12:23:46 2010
@@ -471,6 +471,9 @@
         int height = loc->y1 - loc->y0;
         nsfb_bbox_t clipped; /* clipped display */
 
+	if (width == 0 || height == 0)
+		return true;
+
         /* Scaled bitmaps are handled by a separate function */
         if (width != bmp_width || height != bmp_height)
                 return bitmap_scaled(nsfb, loc, pixel, bmp_width, bmp_height,

Modified: trunk/libnsfb/src/plot/8bpp.c
URL: http://source.netsurf-browser.org/trunk/libnsfb/src/plot/8bpp.c?rev=10613&r1=10612&r2=10613&view=diff
==============================================================================
--- trunk/libnsfb/src/plot/8bpp.c (original)
+++ trunk/libnsfb/src/plot/8bpp.c Thu Jul  8 12:23:46 2010
@@ -452,6 +452,9 @@
         int height = loc->y1 - loc->y0;
         nsfb_bbox_t clipped; /* clipped display */
 
+	if (width == 0 || height == 0)
+		return true;
+
         /* Scaled bitmaps are handled by a separate function */
         if (width != bmp_width || height != bmp_height)
                 return bitmap_scaled(nsfb, loc, pixel, bmp_width, bmp_height,




More information about the netsurf-commits mailing list