summaryrefslogtreecommitdiff
path: root/core/fpdfapi/cmaps/fpdf_cmaps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/cmaps/fpdf_cmaps.cpp')
-rw-r--r--core/fpdfapi/cmaps/fpdf_cmaps.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/cmaps/fpdf_cmaps.cpp b/core/fpdfapi/cmaps/fpdf_cmaps.cpp
index 01c8da9691..ac8456dc69 100644
--- a/core/fpdfapi/cmaps/fpdf_cmaps.cpp
+++ b/core/fpdfapi/cmaps/fpdf_cmaps.cpp
@@ -60,10 +60,11 @@ void FPDFAPI_FindEmbeddedCMap(const ByteString& bsName,
pMap = nullptr;
CPDF_FontGlobals* pFontGlobals =
CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals();
- const FXCMAP_CMap* pCMaps =
- pFontGlobals->m_EmbeddedCharsets[charset].m_pMapList.Get();
- for (uint32_t i = 0; i < pFontGlobals->m_EmbeddedCharsets[charset].m_Count;
- i++) {
+
+ const FXCMAP_CMap* pCMaps;
+ uint32_t count;
+ std::tie(count, pCMaps) = pFontGlobals->GetEmbeddedCharset(charset);
+ for (uint32_t i = 0; i < count; i++) {
if (bsName == pCMaps[i].m_Name) {
pMap = &pCMaps[i];
break;