2
0
Эх сурвалжийг харах

* fix nested for-loop that used the same index

peter 21 жил өмнө
parent
commit
2971983471

+ 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;