From 56500afb28872f4050d42d536628daa1df5ab6a5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 8 Apr 2014 18:42:28 +0300 Subject: [PATCH] Fix skipping bytes in JpegLoader Bytes in the buffer are not considered as processed yet, and are included in count. --- source/graphics/jpeg/jpegloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/graphics/jpeg/jpegloader.cpp b/source/graphics/jpeg/jpegloader.cpp index 415e79f..9aadcb9 100644 --- a/source/graphics/jpeg/jpegloader.cpp +++ b/source/graphics/jpeg/jpegloader.cpp @@ -61,7 +61,7 @@ void skip_input_data(j_decompress_ptr jpeg, long count) } else { - src->io->seek(count, Msp::IO::S_CUR); + src->io->seek(count-src->bytes_in_buffer, Msp::IO::S_CUR); src->bytes_in_buffer = 0; } } -- 2.43.0