mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
LibGfx: Correct the allocated buffer size in serialize_to_byte_buffer()
Fixes #5131.
This commit is contained in:
parent
7cf0c7cc0d
commit
c899ace3ad
1 changed files with 1 additions and 1 deletions
|
@ -301,7 +301,7 @@ RefPtr<Bitmap> Bitmap::create_from_serialized_byte_buffer(ByteBuffer&& buffer)
|
|||
|
||||
ByteBuffer Bitmap::serialize_to_byte_buffer() const
|
||||
{
|
||||
auto buffer = ByteBuffer::create_uninitialized(4 * sizeof(unsigned) + sizeof(BitmapFormat) + sizeof(RGBA32) * palette_size(m_format) + size_in_bytes());
|
||||
auto buffer = ByteBuffer::create_uninitialized(5 * sizeof(unsigned) + sizeof(BitmapFormat) + sizeof(RGBA32) * palette_size(m_format) + size_in_bytes());
|
||||
OutputMemoryStream stream { buffer };
|
||||
|
||||
auto write = [&]<typename T>(T value) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue