diff --git a/compiler/entfile.pas b/compiler/entfile.pas index 1e1be524c9..a3916783ef 100644 --- a/compiler/entfile.pas +++ b/compiler/entfile.pas @@ -609,13 +609,13 @@ end; function tentryfile.getbyte:byte; begin - if entryidx+1>entry.size then + if entryidx>=entry.size then begin error:=true; result:=0; exit; end; - if bufsize-bufidx>=1 then + if bufidx