summaryrefslogtreecommitdiff
path: root/src/save.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-11-07 15:37:00 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2018-11-07 15:37:00 -0500
commit325cc10aa762d9a80b95fc4101383a23a7e12f14 (patch)
tree41ef70fce7a54d29afc8f8d1786dcaf64ac2df48 /src/save.c
parent65b57e5a269c9dd4bdaf82e9cac2b2f5bb82772c (diff)
sub_8113F14; make C code compatible with modern cc1
Diffstat (limited to 'src/save.c')
-rw-r--r--src/save.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/save.c b/src/save.c
index 28f6a2896..ef38d8b17 100644
--- a/src/save.c
+++ b/src/save.c
@@ -614,7 +614,12 @@ u16 CalculateChecksum(void *data, u16 size)
u32 checksum = 0;
for (i = 0; i < (size / 4); i++)
- checksum += *((u32 *)data)++;
+ {
+ // checksum += *(u32 *)data++;
+ // For compatibility with modern gcc, these statements were separated.
+ checksum += *(u32 *)data;
+ data += 4;
+ }
return ((checksum >> 16) + checksum);
}