Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-08-12 05:21:32 +0300
committerCampbell Barton <campbell@blender.org>2022-08-12 05:21:47 +0300
commit266a125b11c664256c3674f3393894e039c806b6 (patch)
treefec219ea828e47f008d928855538f7b0f9926cae /source/blender/blendthumb
parentf145366ae078b4ffdcb4a80a7a3011a336a61ed2 (diff)
Cleanup: use sizeof() for better readability
Diffstat (limited to 'source/blender/blendthumb')
-rw-r--r--source/blender/blendthumb/src/blendthumb_extract.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blendthumb/src/blendthumb_extract.cc b/source/blender/blendthumb/src/blendthumb_extract.cc
index 163197c8b67..fff1242f2ce 100644
--- a/source/blender/blendthumb/src/blendthumb_extract.cc
+++ b/source/blender/blendthumb/src/blendthumb_extract.cc
@@ -136,7 +136,7 @@ static eThumbStatus blendthumb_extract_from_file_impl(FileReader *file,
thumb->height = bytes_to_native_i32(&shape[4], endian_switch);
/* Verify that image dimensions and data size make sense. */
- size_t data_size = block_size - 8;
+ size_t data_size = block_size - sizeof(shape);
const uint64_t expected_size = static_cast<uint64_t>(thumb->width) *
static_cast<uint64_t>(thumb->height) * 4;
if (thumb->width < 0 || thumb->height < 0 || data_size != expected_size) {