summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/parser/cxfa_layoutpagemgr.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_resolveprocessor.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
index b02efbb45d..b80100a5f0 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
@@ -170,7 +170,7 @@ CXFA_Node* ResolveBreakTarget(CXFA_Node* pPageSetRoot,
return pNode;
} else if (bNewExprStyle) {
CFX_WideString wsProcessedTarget = wsExpr;
- if (wsExpr.Left(4) == L"som(" && wsExpr.Right(1) == L")") {
+ if (wsExpr.Left(4) == L"som(" && wsExpr.Last() == L')') {
wsProcessedTarget = wsExpr.Mid(4, wsExpr.GetLength() - 5);
}
XFA_RESOLVENODE_RS rs;
diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
index fe4605b4f0..15c3f14b23 100644
--- a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
@@ -661,9 +661,9 @@ void CXFA_ResolveProcessor::DoPredicateFilter(int32_t iCurIndex,
ASSERT(iFoundCount == pdfium::CollectionSize<int32_t>(rnd.m_Objects));
CFX_WideString wsExpression;
XFA_SCRIPTLANGTYPE eLangType = XFA_SCRIPTLANGTYPE_Unkown;
- if (wsCondition.Left(2) == L".[" && wsCondition.Right(1) == L"]") {
+ if (wsCondition.Left(2) == L".[" && wsCondition.Last() == L']') {
eLangType = XFA_SCRIPTLANGTYPE_Formcalc;
- } else if (wsCondition.Left(2) == L".(" && wsCondition.Right(1) == L")") {
+ } else if (wsCondition.Left(2) == L".(" && wsCondition.Last() == L')') {
eLangType = XFA_SCRIPTLANGTYPE_Javascript;
} else {
return;