summaryrefslogtreecommitdiff
path: root/core/src/fpdftext/fpdf_text_int.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdftext/fpdf_text_int.cpp')
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 8a359fe9af..1e6d54d133 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -2464,12 +2464,12 @@ FX_BOOL CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString,
const FX_WCHAR* lpszFullString,
int iSubString,
FX_WCHAR chSep) {
- if (lpszFullString == NULL) {
+ if (!lpszFullString) {
return FALSE;
}
while (iSubString--) {
lpszFullString = FXSYS_wcschr(lpszFullString, chSep);
- if (lpszFullString == NULL) {
+ if (!lpszFullString) {
rString.Empty();
return FALSE;
}
@@ -2479,8 +2479,8 @@ FX_BOOL CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString,
}
}
const FX_WCHAR* lpchEnd = FXSYS_wcschr(lpszFullString, chSep);
- int nLen = (lpchEnd == NULL) ? (int)FXSYS_wcslen(lpszFullString)
- : (int)(lpchEnd - lpszFullString);
+ int nLen = lpchEnd ? (int)(lpchEnd - lpszFullString)
+ : (int)FXSYS_wcslen(lpszFullString);
ASSERT(nLen >= 0);
FXSYS_memcpy(rString.GetBuffer(nLen), lpszFullString,
nLen * sizeof(FX_WCHAR));