1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:07:35 +00:00

LibTTF: Use ByteBuffer::copy() since wrap() was removed

This commit is contained in:
Stephan Unverwerth 2020-12-29 16:12:19 +01:00 committed by Andreas Kling
parent 222b7f6c87
commit 9689d914b4
3 changed files with 3 additions and 5 deletions

View file

@ -271,7 +271,7 @@ RefPtr<Font> Font::load_from_offset(ByteBuffer&& buffer, u32 offset)
dbg() << "Font file too small";
return nullptr;
}
auto buffer_here = ByteBuffer::wrap(buffer.offset_pointer(table_offset), table_length);
auto buffer_here = ByteBuffer::copy(buffer.offset_pointer(table_offset), table_length);
// Get the table offsets we need.
if (tag == tag_from_str("head")) {