Browse Source

* Fix rare case of stream contents not being read correctly

(cherry picked from commit 0fac221a61414d3b1bc77cd00a34ce8498a86a58)
Michaël Van Canneyt 2 years ago
parent
commit
1eee31c04f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/fcl-pdf/src/fppdfsource.pp

+ 2 - 0
packages/fcl-pdf/src/fppdfsource.pp

@@ -217,6 +217,8 @@ begin
       if not FillBufferForwardAt(FPosition) then
       if not FillBufferForwardAt(FPosition) then
         aCount:=0;
         aCount:=0;
     end;
     end;
+  if IsEOB then
+    FillBufferForwardAt(FPosition);
 end;
 end;
 
 
 procedure TPDFSourceStream.Previous;
 procedure TPDFSourceStream.Previous;