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/?p=glBitmap.git;a=commitdiff_plain;h=669392448a38034e96a92fa3c8063b41d3ecae55;hp=40c2e1a73048b33c1a9f238748a3dd14b98099a1 * 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;