Index: core/src/fpdftext/fpdf_text.cpp |
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp |
index 40f5dd4926a3ae113b32b582b72b8cfcd987afed..9ecbc21bdac06bea0d72dc3a1584b27cb75e3966 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() { |