mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 08:56:40 +00:00
LibGfx: Ensure const-correctness when reading from the GPOS byte stream
Otherwise, the call to `read_in_place` gives the following error: Tried to obtain a non-const span from a read-only FixedMemoryStream
This commit is contained in:
parent
e576bf975c
commit
a098b6e371
|
@ -526,7 +526,7 @@ ErrorOr<GPOS> GPOS::from_slice(ReadonlyBytes slice)
|
|||
|
||||
TRY(stream.seek(header.lookup_list_offset, SeekMode::SetPosition));
|
||||
auto const& lookup_list = *TRY(stream.read_in_place<LookupList const>());
|
||||
auto lookup_records = TRY(stream.read_in_place<Offset16>(lookup_list.lookup_count));
|
||||
auto lookup_records = TRY(stream.read_in_place<Offset16 const>(lookup_list.lookup_count));
|
||||
|
||||
return GPOS { slice, header, script_list, script_records, feature_list, feature_records, lookup_list, lookup_records };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue