]> git.tdb.fi Git - libs/gui.git/commitdiff
Fix skipping bytes in JpegLoader
authorMikko Rasa <tdb@tdb.fi>
Tue, 8 Apr 2014 15:42:28 +0000 (18:42 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 8 Apr 2014 15:42:28 +0000 (18:42 +0300)
Bytes in the buffer are not considered as processed yet, and are included
in count.

source/graphics/jpeg/jpegloader.cpp

index 415e79f95927959c6d667233e7734e5ed657d226..9aadcb9e8daa849c922d6a5269df4dc34eae9ffc 100644 (file)
@@ -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;
        }
 }