about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2020-12-16 22:38:34 +0100
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2020-12-16 22:38:34 +0100
commitff0e34179e35e89c48486e4d3cd6afc87cc874b8 (patch)
tree85668e3622788f2d002be3d4ca024f517f825912
parent88b8ea96c8769645426c4afdcd3daa725a1ff82f (diff)
fix(bitmap): fix “resizing” if one dimension is zero
-rw-r--r--bitmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bitmap.c b/bitmap.c
index d9ac612..ab20def 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -23,6 +23,7 @@ bool bs_bitmap_extend(bs_bitmap_t *b, int new_w, int new_h, unsigned char init)
       (b->bs_bitmap_width == 0 && diff_x == 0)) {
     b->bs_bitmap_width = new_w;
     b->bs_bitmap_height = new_h;
+    return true;
   }
 
   // perform y only resize if possible because it doesn't require copying