Index: fpdfsdk/fxedit/fxet_ap.cpp |
diff --git a/fpdfsdk/fxedit/fxet_ap.cpp b/fpdfsdk/fxedit/fxet_ap.cpp |
index 6f064b2ce89e19d7ed0bce68930293bc7994c866..5bf61365c5ad181290d698f710b0022042c2c46e 100644 |
--- a/fpdfsdk/fxedit/fxet_ap.cpp |
+++ b/fpdfsdk/fxedit/fxet_ap.cpp |
@@ -18,12 +18,10 @@ CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap, |
if (SubWord > 0) { |
Word = SubWord; |
} else { |
- FX_DWORD dwCharCode = -1; |
- |
- if (pPDFFont->IsUnicodeCompatible()) |
- dwCharCode = pPDFFont->CharCodeFromUnicode(Word); |
- else |
- dwCharCode = pFontMap->CharCodeFromUnicode(nFontIndex, Word); |
+ FX_DWORD dwCharCode = |
+ pPDFFont->IsUnicodeCompatible() |
+ ? pPDFFont->CharCodeFromUnicode(Word) |
+ : pFontMap->CharCodeFromUnicode(nFontIndex, Word); |
if (dwCharCode > 0) { |
pPDFFont->AppendChar(sWord, dwCharCode); |