hedgewars/uStore.pas
changeset 15373 410a83aa9d9a
parent 15372 3907c95227b8
child 15382 34eb5cc72241
--- a/hedgewars/uStore.pas	Fri Aug 23 21:04:40 2019 +0300
+++ b/hedgewars/uStore.pas	Fri Aug 23 21:12:56 2019 +0300
@@ -386,7 +386,7 @@
     ai: TAmmoType;
     tmpsurf, tmpoverlay: PSDL_Surface;
     i, y, x, imflags: LongInt;
-    rowData: PByte;
+    rowData: PByteArray;
     keyConfirm, keyQuit: shortstring;
 begin
 AddFileLog('StoreLoad()');
@@ -438,7 +438,7 @@
                     for y := 0 to tmpsurf^.h-1 do
                         begin
                         for x := 0 to tmpsurf^.w - 1 do
-                            PByteArray(rowData)^[x] := PByteArray(tmpsurf^.pixels)^[y * tmpsurf^.pitch + x * 4 + AByteIndex];
+                            rowData^[x] := PByteArray(tmpsurf^.pixels)^[y * tmpsurf^.pitch + x * 4 + AByteIndex];
                         syncedPixelDigest:= Adler32Update(syncedPixelDigest, rowData, tmpsurf^.w);
                         end;
                     FreeMem(rowData, tmpsurf^.w);