summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,