diff options
author | qarmin <mikrutrafal54@gmail.com> | 2019-06-20 16:59:48 +0200 |
---|---|---|
committer | qarmin <mikrutrafal54@gmail.com> | 2019-06-20 16:59:48 +0200 |
commit | 072e40368e19e0f88ec1fbb61fe463a6fffcca36 (patch) | |
tree | 2a5c9383550dc22392bb210d5be570e1baa33fe2 /modules/bmp | |
parent | 7a8dcb9a114d742f9bc1e269d738903c00729b8b (diff) |
Fix always true/false values
Diffstat (limited to 'modules/bmp')
-rw-r--r-- | modules/bmp/image_loader_bmp.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/bmp/image_loader_bmp.cpp b/modules/bmp/image_loader_bmp.cpp index bcc992db24..b4530c2df1 100644 --- a/modules/bmp/image_loader_bmp.cpp +++ b/modules/bmp/image_loader_bmp.cpp @@ -261,12 +261,10 @@ Error ImageLoaderBMP::load_image(Ref<Image> p_image, FileAccess *f, ERR_FAIL_COND_V(color_table_size == 0, ERR_BUG); PoolVector<uint8_t> bmp_color_table; - if (color_table_size > 0) { - // Color table is usually 4 bytes per color -> [B][G][R][0] - err = bmp_color_table.resize(color_table_size * 4); - PoolVector<uint8_t>::Write bmp_color_table_w = bmp_color_table.write(); - f->get_buffer(bmp_color_table_w.ptr(), color_table_size * 4); - } + // Color table is usually 4 bytes per color -> [B][G][R][0] + err = bmp_color_table.resize(color_table_size * 4); + PoolVector<uint8_t>::Write bmp_color_table_w = bmp_color_table.write(); + f->get_buffer(bmp_color_table_w.ptr(), color_table_size * 4); f->seek(bmp_header.bmp_file_header.bmp_file_offset); |