mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 13:18:19 +00:00
LibGfx: Fix writing PNG headers on x86_64
m_data.size() returns a size_t which is a 64-bit type on x86_64. This resulted in us incorrectly using zero in the PNG header.
This commit is contained in:
parent
e4538ce8ef
commit
079dec11d3
Notes:
sideshowbarker
2024-07-18 07:39:06 +09:00
Author: https://github.com/gunnarbeutner
Commit: 079dec11d3
Pull-request: https://github.com/SerenityOS/serenity/pull/9148
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ void PNGChunk::store_type()
|
|||
|
||||
void PNGChunk::store_data_length()
|
||||
{
|
||||
auto data_length = BigEndian(m_data.size() - sizeof(data_length_type) - m_type.length());
|
||||
auto data_length = BigEndian<u32>(m_data.size() - sizeof(data_length_type) - m_type.length());
|
||||
__builtin_memcpy(m_data.offset_pointer(0), &data_length, sizeof(u32));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue