# HG changeset patch # User alfadur # Date 1566583480 -10800 # Node ID 3907c95227b858061e38515d3acbd13e1df50f2e # Parent 81037b6052f4022730c9e3ed798ae9957260524f digest with byte arrays diff -r 81037b6052f4 -r 3907c95227b8 hedgewars/uLandObjects.pas --- a/hedgewars/uLandObjects.pas Fri Aug 23 19:26:52 2019 +0300 +++ b/hedgewars/uLandObjects.pas Fri Aug 23 21:04:40 2019 +0300 @@ -369,7 +369,7 @@ if alphaOnly then begin for x := 0 to Image^.w - 1 do - (rowData + x)^:= (PByte(Image^.pixels) + y * Image^.pitch + x * 4 + AByteIndex)^; + PByteArray(rowData)^[x] := PByteArray(Image^.pixels)^[y * Image^.pitch + x * 4 + AByteIndex]; syncedPixelDigest:= Adler32Update(syncedPixelDigest, rowData, Image^.w); end else diff -r 81037b6052f4 -r 3907c95227b8 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Fri Aug 23 19:26:52 2019 +0300 +++ b/hedgewars/uStore.pas Fri Aug 23 21:04:40 2019 +0300 @@ -438,7 +438,7 @@ for y := 0 to tmpsurf^.h-1 do begin for x := 0 to tmpsurf^.w - 1 do - (rowData + x)^:= (PByte(tmpsurf^.pixels) + y * tmpsurf^.pitch + x * 4 + AByteIndex)^; + PByteArray(rowData)^[x] := PByteArray(tmpsurf^.pixels)^[y * tmpsurf^.pitch + x * 4 + AByteIndex]; syncedPixelDigest:= Adler32Update(syncedPixelDigest, rowData, tmpsurf^.w); end; FreeMem(rowData, tmpsurf^.w);