From 1e549cb62d008b203d68652a7d43a2b4d8ced8cc Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 11 Nov 2026 20:45:07 +0000 Subject: [PATCH] Decompile fn_07870 (CGifRes::DecodeGif) Batch #17295 by SapitoSucio: 0 byte-identical, 1 confirmed by peer review. - fn_07870 CGifRes::DecodeGif: logic confirmed by peer review Peer-reviewed-by: eAthena, alisonrag Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Resource/Bitmap/GifResource.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Resource/Bitmap/GifResource.cpp b/Source/Resource/Bitmap/GifResource.cpp index 0eb67c647..e2fcbe593 100644 --- a/Source/Resource/Bitmap/GifResource.cpp +++ b/Source/Resource/Bitmap/GifResource.cpp @@ -347,8 +347,8 @@ bool CGifRes::DecodeGif(const void* data, int bytes, bool iconOnly) { memcpy_s(pixels, 4 * pixelCount, this->frames.back().second, 4 * pixelCount); } - for (std::uint16_t y = 0; y < descriptor.height; ++y) { - for (std::uint16_t x = 0; x < descriptor.width; ++x) { + for (int y = 0; y < descriptor.height; ++y) { + for (int x = 0; x < descriptor.width; ++x) { const std::uint32_t color = palette[std::min(indices[y * descriptor.width + x], paletteCount)]; if (this->frames.empty() || transparent != 1 || color != palette[std::min(transparentIndex, paletteCount)]) { const unsigned int position = (descriptor.top + y) * screenWidth + x + descriptor.left;