summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_cmaps
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/fpdf_cmaps')
-rw-r--r--core/fpdfapi/fpdf_cmaps/cmap_int.h3
-rw-r--r--core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp10
2 files changed, 7 insertions, 6 deletions
diff --git a/core/fpdfapi/fpdf_cmaps/cmap_int.h b/core/fpdfapi/fpdf_cmaps/cmap_int.h
index 685d6fe4b1..5735432371 100644
--- a/core/fpdfapi/fpdf_cmaps/cmap_int.h
+++ b/core/fpdfapi/fpdf_cmaps/cmap_int.h
@@ -7,6 +7,7 @@
#ifndef CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_
#define CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_
+#include "core/fxcrt/include/fx_string.h"
#include "core/fxcrt/include/fx_system.h"
struct FXCMAP_CMap {
@@ -22,7 +23,7 @@ struct FXCMAP_CMap {
int m_UseOffset;
};
-void FPDFAPI_FindEmbeddedCMap(const char* name,
+void FPDFAPI_FindEmbeddedCMap(const CFX_ByteString& name,
int charset,
int coding,
const FXCMAP_CMap*& pMap);
diff --git a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
index 1e0250c1af..caf234badb 100644
--- a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
+++ b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
@@ -53,7 +53,7 @@ static int compareDWordSingle(const void* p1, const void* p2) {
}; // extern "C"
-void FPDFAPI_FindEmbeddedCMap(const char* name,
+void FPDFAPI_FindEmbeddedCMap(const CFX_ByteString& bsName,
int charset,
int coding,
const FXCMAP_CMap*& pMap) {
@@ -64,10 +64,10 @@ void FPDFAPI_FindEmbeddedCMap(const char* name,
pFontGlobals->m_EmbeddedCharsets[charset].m_pMapList;
for (uint32_t i = 0; i < pFontGlobals->m_EmbeddedCharsets[charset].m_Count;
i++) {
- if (FXSYS_strcmp(name, pCMaps[i].m_Name))
- continue;
- pMap = &pCMaps[i];
- break;
+ if (bsName == pCMaps[i].m_Name) {
+ pMap = &pCMaps[i];
+ break;
+ }
}
}