Thumbnail: fix off-by-one of Height/Width attribute
Fixes #18128
Change-Id: I3abe72552657517acece101a1653b2f013b4f23f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5881
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit d3811d00367caaabe90e0c20704b04f51aebd75d)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5855
Diff
src/kits/tracker/Thumbnails.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -200,12 +200,12 @@
bool thumbnailWritten = false;
const int32 width = image->Bounds().IntegerWidth();
const int32 width = image->Bounds().IntegerWidth() + 1;
const size_t written = fFile->WriteAttr("Media:Width", B_INT32_TYPE,
0, &width, sizeof(int32));
if (written == sizeof(int32)) {
const int32 height = image->Bounds().IntegerHeight();
const int32 height = image->Bounds().IntegerHeight() + 1;
fFile->WriteAttr("Media:Height", B_INT32_TYPE, 0, &height, sizeof(int32));