summaryrefslogtreecommitdiff
path: root/i18npool/source/localedata/saxparser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool/source/localedata/saxparser.cxx')
-rw-r--r--i18npool/source/localedata/saxparser.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/i18npool/source/localedata/saxparser.cxx b/i18npool/source/localedata/saxparser.cxx
index 85b4570a6684..ace747d8286f 100644
--- a/i18npool/source/localedata/saxparser.cxx
+++ b/i18npool/source/localedata/saxparser.cxx
@@ -61,9 +61,7 @@ public:
public:
virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) override
{
- nBytesToRead = (nBytesToRead > m_seq.getLength() - nPos ) ?
- m_seq.getLength() - nPos :
- nBytesToRead;
+ nBytesToRead = std::min(nBytesToRead, m_seq.getLength() - nPos);
aData = Sequence< sal_Int8 > ( &(m_seq.getConstArray()[nPos]) , nBytesToRead );
nPos += nBytesToRead;
return nBytesToRead;