From: Mikko Rasa Date: Tue, 8 Apr 2014 15:42:28 +0000 (+0300) Subject: Fix skipping bytes in JpegLoader X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=56500afb28872f4050d42d536628daa1df5ab6a5;p=libs%2Fgui.git Fix skipping bytes in JpegLoader Bytes in the buffer are not considered as processed yet, and are included in count. --- 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; } }