Skip to content

Commit

Permalink
PDFBOX-5957: optimize
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1923835 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Feb 15, 2025
1 parent 58dd79c commit eebce4d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ else if (startOpIdx != -1 && endOpIdx == -1 &&
}

// PDFBOX-3742: just assuming that 1-3 non blanks is a PDF operator isn't enough
if (endOpIdx != -1 && startOpIdx != -1)
if (noBinData && endOpIdx != -1 && startOpIdx != -1)
{
// usually, the operator here is Q, sometimes EMC (PDFBOX-2376), S (PDFBOX-3784)
s = new String(binCharTestArr, startOpIdx, endOpIdx - startOpIdx);
Expand All @@ -373,7 +373,7 @@ else if (startOpIdx != -1 && endOpIdx == -1 &&
}

// only if not close to EOF
if (startOpIdx != -1 && readBytes == MAX_BIN_CHAR_TEST_LENGTH)
if (noBinData && startOpIdx != -1 && readBytes == MAX_BIN_CHAR_TEST_LENGTH)
{
if (endOpIdx == -1)
{
Expand Down

0 comments on commit eebce4d

Please sign in to comment.