mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:37:45 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue