mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-17 06:52:23 +00:00
LibGfx/GIF: Use the correct reference to seek before the trailer
This was working with files, but with pre-allocated buffers, the end is not the same position as last written byte.
This commit is contained in:
parent
3c4b8749f0
commit
07446bbea1
Notes:
sideshowbarker
2024-07-17 06:54:15 +09:00
Author: https://github.com/LucasChollet
Commit: 07446bbea1
Pull-request: https://github.com/SerenityOS/serenity/pull/24412
Reviewed-by: https://github.com/nico ✅
Reviewed-by: https://github.com/trflynn89
1 changed files with 1 additions and 1 deletions
|
@ -182,7 +182,7 @@ ErrorOr<void> GIFAnimationWriter::add_frame(Bitmap& bitmap, int duration_ms, Int
|
|||
|
||||
// Let's get rid of the previously written trailer
|
||||
if (!m_is_first_frame)
|
||||
TRY(m_stream.seek(-1, SeekMode::FromEndPosition));
|
||||
TRY(m_stream.seek(-1, SeekMode::FromCurrentPosition));
|
||||
|
||||
m_is_first_frame = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue