mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
LibGfx: Let decode_bmp_v5_dib() skip reserved field
This has no effect in practice: decode_bmp_v5_dib() is the last thing called with the streamer object (...the streamer is passed to set_dib_bitmasks(), but that doesn't read anything off it except for DIBType::Info bitmaps, which v5 bitmaps aren't). But dib_size is 16 larger for v5 than for v4, so we should read 16 bytes. This is also useful for a hypothetical person who might look at the reading code to figure out how the writing code should look like.
This commit is contained in:
parent
8d3ab2de56
commit
e37000b1ea
1 changed files with 1 additions and 0 deletions
|
@ -805,6 +805,7 @@ static bool decode_bmp_v5_dib(BMPLoadingContext& context, InputStreamer& streame
|
|||
v5.intent = streamer.read_u32();
|
||||
v5.profile_data = streamer.read_u32();
|
||||
v5.profile_size = streamer.read_u32();
|
||||
streamer.drop_bytes(4); // Ignore reserved field.
|
||||
|
||||
if constexpr (BMP_DEBUG) {
|
||||
dbgln("BMP intent: {}", v5.intent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue