summaryrefslogtreecommitdiff
path: root/src/plot
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2010-07-08 17:23:46 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2010-07-08 17:23:46 +0000
commit2774b6d0021db426c334c643de07d28faf0517af (patch)
tree9c551ff522b6a83ad4c84a08e1db1a5e6666f7d7 /src/plot
parentfa9e2e6061d565054b3c4e91e468551b72274f44 (diff)
downloadlibnsfb-2774b6d0021db426c334c643de07d28faf0517af.tar.gz
libnsfb-2774b6d0021db426c334c643de07d28faf0517af.tar.bz2
Don't try to plot bitmaps at 0 width or height.
svn path=/trunk/libnsfb/; revision=10613
Diffstat (limited to 'src/plot')
-rw-r--r--src/plot/16bpp.c3
-rw-r--r--src/plot/32bpp.c3
-rw-r--r--src/plot/8bpp.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/src/plot/16bpp.c b/src/plot/16bpp.c
index 84aa813..028e453 100644
--- a/src/plot/16bpp.c
+++ b/src/plot/16bpp.c
@@ -473,6 +473,9 @@ bitmap(nsfb_t *nsfb,
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,
diff --git a/src/plot/32bpp.c b/src/plot/32bpp.c
index 220db44..434baa6 100644
--- a/src/plot/32bpp.c
+++ b/src/plot/32bpp.c
@@ -471,6 +471,9 @@ bitmap(nsfb_t *nsfb,
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,
diff --git a/src/plot/8bpp.c b/src/plot/8bpp.c
index 4da9df2..472c213 100644
--- a/src/plot/8bpp.c
+++ b/src/plot/8bpp.c
@@ -452,6 +452,9 @@ bitmap(nsfb_t *nsfb,
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,