Index: core/src/fpdftext/fpdf_text.cpp |
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp |
index 0b53338ea0fdaa7f3bc43bb50f43190b5848a53b..2bd8b7d6cea18c855056fbef2679be7e25687a8b 100644 |
--- a/core/src/fpdftext/fpdf_text.cpp |
+++ b/core/src/fpdftext/fpdf_text.cpp |
@@ -22,10 +22,7 @@ CFX_ByteString CharFromUnicodeAlt(FX_WCHAR unicode, |
return CFX_ByteString((char)unicode); |
} |
const FX_CHAR* altstr = FCS_GetAltStr(unicode); |
- if (altstr) { |
- return CFX_ByteString(altstr, -1); |
- } |
- return CFX_ByteString(defchar, -1); |
+ return CFX_ByteString(altstr ? altstr : defchar); |
} |
char buf[10]; |
int iDef = 0; |
@@ -35,10 +32,7 @@ CFX_ByteString CharFromUnicodeAlt(FX_WCHAR unicode, |
return CFX_ByteString(buf, ret); |
} |
const FX_CHAR* altstr = FCS_GetAltStr(unicode); |
- if (altstr) { |
- return CFX_ByteString(altstr, -1); |
- } |
- return CFX_ByteString(defchar, -1); |
+ return CFX_ByteString(altstr ? altstr : defchar); |
} |
CTextPage::CTextPage() {} |
CTextPage::~CTextPage() { |