summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/fxge/android/fpf_skiafont.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/src/fxge/android/fpf_skiafont.cpp b/core/src/fxge/android/fpf_skiafont.cpp
index 40b18864ed..2dad01057a 100644
--- a/core/src/fxge/android/fpf_skiafont.cpp
+++ b/core/src/fxge/android/fpf_skiafont.cpp
@@ -159,12 +159,13 @@ int32_t CFPF_SkiaFont::GetItalicAngle() const
FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD dwSize)
{
if (!m_Face) {
- return FALSE;
+ return 0;
}
- if (FXFT_Load_Sfnt_Table(m_Face, dwTable, 0, pBuffer, (unsigned long*)&dwSize)) {
+ FT_ULong ulSize = pdfium::base::checked_cast<FT_ULong>(dwSize);
+ if (FXFT_Load_Sfnt_Table(m_Face, dwTable, 0, pBuffer, &ulSize)) {
return 0;
}
- return dwSize;
+ return pdfium::base::checked_cast<FX_DWORD>(ulSize);
}
FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, const CFX_ByteStringC& bsFamily, FX_DWORD dwStyle, uint8_t uCharset)
{