summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_xmllocale.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/cxfa_xmllocale.cpp b/xfa/fxfa/parser/cxfa_xmllocale.cpp
index f9e4353dca..659c7bbefe 100644
--- a/xfa/fxfa/parser/cxfa_xmllocale.cpp
+++ b/xfa/fxfa/parser/cxfa_xmllocale.cpp
@@ -109,7 +109,7 @@ WideString CXFA_XMLLocale::GetEraName(bool bAD) const {
WideString CXFA_XMLLocale::GetCalendarSymbol(const ByteStringView& symbol,
int index,
bool bAbbr) const {
- if (!m_pLocaleData)
+ if (index < 0 || !m_pLocaleData)
return WideString();
CXML_Element* pChild = m_pLocaleData->GetElement("", "calendarSymbols", 0);
@@ -195,8 +195,8 @@ WideString CXFA_XMLLocale::GetNumPattern(FX_LOCALENUMSUBCATEGORY eType) const {
WideString CXFA_XMLLocale::GetPattern(CXML_Element* pElement,
const ByteStringView& bsTag,
const WideStringView& wsName) const {
- int32_t iCount = pElement->CountElements("", bsTag);
- for (int32_t i = 0; i < iCount; i++) {
+ size_t iCount = pElement->CountElements("", bsTag);
+ for (size_t i = 0; i < iCount; i++) {
CXML_Element* pChild = pElement->GetElement("", bsTag, i);
if (pChild->GetAttrValue("name") == wsName) {
CXML_Content* pContent = ToContent(pChild->GetChild(0));