summaryrefslogtreecommitdiff
path: root/core/src/fpdftext
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdftext')
-rw-r--r--core/src/fpdftext/fpdf_text.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
index 0b53338ea0..2bd8b7d6ce 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() {