readUnsignedNumberMaxDigits can read more than maxDigits chars
...so that is what the std::min was good for that the previous commit erroneously removed. Change-Id: I0cb08ab79f85ce4b919232845994c9b8bae35646
This commit is contained in:
@@ -1123,8 +1123,8 @@ bool Converter::convertDuration(util::Duration& rDuration,
|
|||||||
if (-1 != nTemp)
|
if (-1 != nTemp)
|
||||||
{
|
{
|
||||||
nNanoSeconds = nTemp;
|
nNanoSeconds = nTemp;
|
||||||
sal_Int32 nDigits = nPos - nStart;
|
sal_Int32 nDigits = std::min<sal_Int32>(nPos - nStart, 9);
|
||||||
assert(nDigits >= 0 && nDigits <= 9);
|
assert(nDigits >= 0);
|
||||||
for (; nDigits < 9; ++nDigits)
|
for (; nDigits < 9; ++nDigits)
|
||||||
{
|
{
|
||||||
nNanoSeconds *= 10;
|
nNanoSeconds *= 10;
|
||||||
|
Reference in New Issue
Block a user