summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_cmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/font/cpdf_cmap.cpp')
-rw-r--r--core/fpdfapi/font/cpdf_cmap.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/font/cpdf_cmap.cpp b/core/fpdfapi/font/cpdf_cmap.cpp
index f3ef829e20..ee8f264869 100644
--- a/core/fpdfapi/font/cpdf_cmap.cpp
+++ b/core/fpdfapi/font/cpdf_cmap.cpp
@@ -338,7 +338,8 @@ uint16_t CPDF_CMap::CIDFromCharCode(uint32_t charcode) const {
}
uint32_t CPDF_CMap::GetNextChar(const ByteStringView& pString,
- size_t& offset) const {
+ size_t* pOffset) const {
+ size_t& offset = *pOffset;
auto pBytes = pString.span();
switch (m_CodingScheme) {
case OneByte: {
@@ -422,7 +423,7 @@ size_t CPDF_CMap::CountChar(const ByteStringView& pString) const {
size_t count = 0;
size_t offset = 0;
while (offset < pString.GetLength()) {
- GetNextChar(pString, offset);
+ GetNextChar(pString, &offset);
count++;
}
return count;