aboutsummaryrefslogtreecommitdiff
path: root/src/CRC32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/CRC32.cpp')
-rw-r--r--src/CRC32.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/CRC32.cpp b/src/CRC32.cpp
index b51b171..c2cc6c0 100644
--- a/src/CRC32.cpp
+++ b/src/CRC32.cpp
@@ -1,5 +1,5 @@
/*
- Copyright 2016-2021 Arisotura
+ Copyright 2016-2022 melonDS team
This file is part of melonDS.
@@ -52,7 +52,7 @@ void _inittable()
}
}
-u32 CRC32(u8 *data, int len)
+u32 CRC32(u8 *data, int len, u32 start)
{
if (!tableinited)
{
@@ -60,7 +60,7 @@ u32 CRC32(u8 *data, int len)
tableinited = true;
}
- u32 crc = 0xFFFFFFFF;
+ u32 crc = start ^ 0xFFFFFFFF;
while (len--)
crc = (crc >> 8) ^ crctable[(crc & 0xFF) ^ *data++];