diff options
Diffstat (limited to 'core/fpdfapi/fpdf_font/cpdf_type3font.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_font/cpdf_type3font.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp index 9f37d4adee..92f5102cdb 100644 --- a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp +++ b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp @@ -57,14 +57,12 @@ FX_BOOL CPDF_Type3Font::Load() { int StartChar = m_pFontDict->GetIntegerBy("FirstChar"); CPDF_Array* pWidthArray = m_pFontDict->GetArrayBy("Widths"); if (pWidthArray && (StartChar >= 0 && StartChar < 256)) { - uint32_t count = pWidthArray->GetCount(); - if (count > 256) { + size_t count = pWidthArray->GetCount(); + if (count > 256) count = 256; - } - if (StartChar + count > 256) { + if (StartChar + count > 256) count = 256 - StartChar; - } - for (uint32_t i = 0; i < count; i++) { + for (size_t i = 0; i < count; i++) { m_CharWidthL[StartChar + i] = FXSYS_round(pWidthArray->GetNumberAt(i) * xscale * 1000); } |