From: Bergmann89 Date: Tue, 22 Oct 2013 15:28:34 +0000 (+0200) Subject: * fixed bug: buffer overflow when exporting TGA files X-Git-Tag: v3.0.0~27 X-Git-Url: https://git.delphigl.com/?a=commitdiff_plain;h=669392448a38034e96a92fa3c8063b41d3ecae55;p=glBitmap.git * fixed bug: buffer overflow when exporting TGA files --- diff --git a/glBitmap.pas b/glBitmap.pas index 1198bda..0641898 100644 --- a/glBitmap.pas +++ b/glBitmap.pas @@ -4630,7 +4630,7 @@ var begin PixelSize := fPixelSize; - for Idx := 0 to Height * Width do begin + for Idx := 1 to Height * Width do begin Temp := pByteArray(pTemp)^[2]; pByteArray(pTemp)^[2] := pByteArray(pTemp)^[0]; pByteArray(pTemp)^[0] := Temp;