sax: avoid usage of double for parsing nanoseconds here too
Change-Id: Iddf93a116cb333db6465a915dae692c33a60241a
This commit is contained in:
@@ -1645,9 +1645,13 @@ static bool lcl_parseDateTime(
|
|||||||
}
|
}
|
||||||
if (bSuccess)
|
if (bSuccess)
|
||||||
{
|
{
|
||||||
const sal_Int32 nDigits = std::min<sal_Int32>(nPos - nStart, 9);
|
sal_Int32 nDigits = std::min<sal_Int32>(nPos - nStart, 9);
|
||||||
OSL_ENSURE(nDigits > 0, "bad code monkey");
|
assert(nDigits > 0);
|
||||||
nNanoSeconds=static_cast<double>(nTemp)*(1000000000.0/pow(10.0,nDigits));
|
for (; nDigits < 9; ++nDigits)
|
||||||
|
{
|
||||||
|
nTemp *= 10;
|
||||||
|
}
|
||||||
|
nNanoSeconds = nTemp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user