mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
bugfixes
This commit is contained in:
@ -1925,7 +1925,7 @@ QDateTime PDFEncoding::convertToDateTime(const QByteArray& stream)
|
|||||||
for (int i = 0; i < size; ++i)
|
for (int i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
const char currentChar = *it++;
|
const char currentChar = *it++;
|
||||||
if (std::isdigit(currentChar))
|
if (std::isdigit(static_cast<unsigned char>(currentChar)))
|
||||||
{
|
{
|
||||||
value = value * 10 + currentChar - '0';
|
value = value * 10 + currentChar - '0';
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ PDFLexicalAnalyzer::Token PDFLexicalAnalyzer::fetch()
|
|||||||
treatAsReal = true;
|
treatAsReal = true;
|
||||||
real = integer;
|
real = integer;
|
||||||
}
|
}
|
||||||
else if (std::isdigit(lookChar()))
|
else if (std::isdigit(static_cast<unsigned char>(lookChar())))
|
||||||
{
|
{
|
||||||
atLeastOneDigit = true;
|
atLeastOneDigit = true;
|
||||||
PDFInteger digit = lookChar() - '0';
|
PDFInteger digit = lookChar() - '0';
|
||||||
@ -257,6 +257,9 @@ PDFLexicalAnalyzer::Token PDFLexicalAnalyzer::fetch()
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
// Undo fetch char, we do not want to miss first digit
|
||||||
|
--m_current;
|
||||||
|
|
||||||
// Try to scan octal value. Octal number can have 3 digits in this case.
|
// Try to scan octal value. Octal number can have 3 digits in this case.
|
||||||
// According to specification, overflow value can be truncated.
|
// According to specification, overflow value can be truncated.
|
||||||
int octalNumber = -1;
|
int octalNumber = -1;
|
||||||
|
Reference in New Issue
Block a user