mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +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
Notes:
sideshowbarker
2024-07-17 05:05:51 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/a098b6e371 Pull-request: https://github.com/SerenityOS/serenity/pull/21849 Issue: https://github.com/SerenityOS/serenity/issues/21847 Reviewed-by: https://github.com/AtkinsSJ
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…
Reference in a new issue