summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2023-02-18 22:10:52 -0500
committerJelle Raaijmakers <jelle@gmta.nl>2023-02-19 22:31:41 +0100
commit0e66a5c3edc787b1f6ba31eb64db56ec09010c0e (patch)
tree0493e955aa9e35cd85b30909a26c305b86ee2227 /Userland/Libraries
parent07bf2d944c43762b54ecae92856dd47bd1c6dc7b (diff)
downloadserenity-0e66a5c3edc787b1f6ba31eb64db56ec09010c0e.zip
LibGfx: Write multiLocalizedUnicodeType with multiple strings correctly
Found by reencoding Tests/LibGfx/test-inputs/icc-v2.png, the 'dscm' tag.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp b/Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp
index a1f8861777..2e0f132459 100644
--- a/Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp
+++ b/Userland/Libraries/LibGfx/ICC/BinaryWriter.cpp
@@ -112,7 +112,7 @@ static ErrorOr<ByteBuffer> encode_multi_localized_unicode(MultiLocalizedUnicodeT
records[i].country_code = tag_data.records()[i].iso_3166_1_country_code;
records[i].string_length_in_bytes = utf16_strings[i].size() * sizeof(u16);
records[i].string_offset_in_bytes = offset;
- offset += records[i].string_offset_in_bytes;
+ offset += records[i].string_length_in_bytes;
}
auto* string_table = bit_cast<BigEndian<u16>*>(bytes.data() + header_and_record_size);