mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibPDF: Avoid reading fields from moved-from Data object
This might not be an issue at the moment, but moved-from objects are usually in a unspecifed but valid state, meaning that we shouldn't read from them.
This commit is contained in:
committed by
Andreas Kling
parent
bfeca4ebb3
commit
e751ec2089
@@ -40,7 +40,7 @@ PDFErrorOr<NonnullRefPtr<PDFFont>> TrueTypeFont::create(Document* document, Nonn
|
||||
TrueTypeFont::TrueTypeFont(PDFFont::CommonData data)
|
||||
: m_data(data)
|
||||
{
|
||||
m_is_standard_font = data.is_standard_font;
|
||||
m_is_standard_font = m_data.is_standard_font;
|
||||
}
|
||||
|
||||
u32 TrueTypeFont::char_code_to_code_point(u16 char_code) const
|
||||
|
||||
@@ -49,7 +49,7 @@ PDFErrorOr<NonnullRefPtr<Type1Font>> Type1Font::create(Document* document, Nonnu
|
||||
Type1Font::Type1Font(Data data)
|
||||
: m_data(move(data))
|
||||
{
|
||||
m_is_standard_font = data.is_standard_font;
|
||||
m_is_standard_font = m_data.is_standard_font;
|
||||
}
|
||||
|
||||
u32 Type1Font::char_code_to_code_point(u16 char_code) const
|
||||
|
||||
Reference in New Issue
Block a user