Explorar o código

* micro-optimization for tentryfile.getbyte() (based on patch by
J. Gareth Moreton, mantis #35406)

git-svn-id: trunk@41924 -

Jonas Maebe %!s(int64=6) %!d(string=hai) anos
pai
achega
55aeac44f0
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      compiler/entfile.pas

+ 2 - 2
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<bufsize then
     begin
       result:=pbyte(@buf[bufidx])^;
       inc(bufidx);