Commit 3e605b02 authored by Oleg Korshul's avatar Oleg Korshul Committed by Alexander Trofimov

баги с падениями при открытии пдф

parent c69a6f32
...@@ -772,6 +772,8 @@ namespace PdfReader ...@@ -772,6 +772,8 @@ namespace PdfReader
if (!bLimited || unStart + unLength > m_unStart + m_unLength) if (!bLimited || unStart + unLength > m_unStart + m_unLength)
{ {
unNewLength = m_unStart + m_unLength - unStart; unNewLength = m_unStart + m_unLength - unStart;
if (unStart >= m_unLength)
unNewLength = 0;
} }
else else
{ {
...@@ -5464,4 +5466,4 @@ namespace PdfReader ...@@ -5464,4 +5466,4 @@ namespace PdfReader
m_pBufferPointer = m_sBuffer; m_pBufferPointer = m_sBuffer;
return true; return true;
} }
} }
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment