Index: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp |
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp |
index ce29baf738f8b5e3702132cd3882303a6334bb24..6ff0bfb468a407910a1d52804aa1415dfa9fc538 100644 |
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp |
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp |
@@ -486,7 +486,8 @@ FX_BOOL CPDF_DIBSource::LoadColorInfo(CPDF_Dictionary* pFormResources, CPDF_Dict |
} |
} else if (pFilter->GetType() == PDFOBJ_ARRAY) { |
CPDF_Array* pArray = (CPDF_Array*)pFilter; |
- if (pArray->GetString(pArray->GetCount() - 1) == FX_BSTRC("JPXDecode")) { |
+ int count = pArray->GetCount() - 1; |
+ if (pArray->GetStringAt(count) == "JPXDecode") { |
m_bDoBpcCheck = FALSE; |
return TRUE; |
} |
@@ -944,12 +945,13 @@ void CPDF_DIBSource::ValidateDictParam() |
} |
} else if (pFilter->GetType() == PDFOBJ_ARRAY) { |
CPDF_Array *pArray = (CPDF_Array *)pFilter; |
- if (pArray->GetString(pArray->GetCount() - 1) == FX_BSTRC("CCITTFaxDecode") || |
- pArray->GetString(pArray->GetCount() - 1) == FX_BSTRC("JBIG2Decode")) { |
+ int count = pArray->GetCount() - 1; |
+ if (pArray->GetStringAt(count) == "CCITTFaxDecode" || |
+ pArray->GetStringAt(count) == "JBIG2Decode") { |
m_bpc = 1; |
m_nComponents = 1; |
} |
- if (pArray->GetString(pArray->GetCount() - 1) == FX_BSTRC("DCTDecode")) { |
+ if (pArray->GetStringAt(count) == "DCTDecode") { |
Tom Sepez
2015/07/16 20:24:46
nit: is this |else if|?
|
// Previously, pArray->GetString(pArray->GetCount() - 1) == FX_BSTRC("RunLengthDecode") was checked in the "if" statement as well, |
// but too many documents don't conform to it. |
m_bpc = 8; |