Procházet zdrojové kódy

* fix nested for-loop that used the same index

peter před 21 roky
rodič
revize
2971983471
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      fcl/image/fpreadtga.pp

+ 3 - 3
fcl/image/fpreadtga.pp

@@ -179,7 +179,7 @@ Procedure TFPReaderTarga.ReadScanLine(Row : Integer; Stream : TStream);
 Var
   P : PByte;
   B : Byte;
-  I : Integer;
+  I,J : Integer;
   
 begin
   If Not Compressed then
@@ -207,9 +207,9 @@ begin
           end;
         Stream.ReadBuffer(FlastPixel,BytesPerPixel);  
         end;
-      For I:=0 to BytesPerPixel-1 do
+      For J:=0 to BytesPerPixel-1 do
         begin
-        P[0]:=FLastPixel[i];
+        P[0]:=FLastPixel[j];
         Inc(P);
         end;
       end;