--- a/hedgewars/uStore.pas Wed Oct 18 05:28:22 2017 +0200
+++ b/hedgewars/uStore.pas Wed Oct 18 20:33:20 2017 -0400
@@ -62,7 +62,7 @@
implementation
uses uMisc, uConsole, uVariables, uUtils, uTextures, uRender, uRenderUtils,
- uCommands, uPhysFSLayer, uDebug
+ uCommands, uPhysFSLayer, uDebug, adler32
{$IFDEF USE_CONTEXT_RESTORE}, uWorld{$ENDIF};
//type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple);
@@ -373,7 +373,7 @@
var ii: TSprite;
ai: TAmmoType;
tmpsurf, tmpoverlay: PSDL_Surface;
- i, imflags: LongInt;
+ i, y, imflags: LongInt;
begin
AddFileLog('StoreLoad()');
@@ -471,6 +471,10 @@
{$IFDEF USE_CONTEXT_RESTORE}
Surface:= tmpsurf
{$ELSE}
+ if checkSum then
+ for y := 0 to tmpsurf^.h-1 do
+ syncedPixelDigest:= Adler32Update(syncedPixelDigest, @PLongWordArray(tmpsurf^.pixels)^[y*tmpsurf^.w], tmpsurf^.w);
+
if saveSurf then
Surface:= tmpsurf
else