From 9f30d4981e8a48720f49887fdded30da8e0d452b Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 11 Aug 2022 14:27:08 -0700
Subject: [PATCH] Added note about CRC algorithm compatibility
---
src/stdlib/SDL_crc16.c | 3 +++
src/stdlib/SDL_crc32.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/stdlib/SDL_crc16.c b/src/stdlib/SDL_crc16.c
index db011ba10f9..0008b2e3eea 100644
--- a/src/stdlib/SDL_crc16.c
+++ b/src/stdlib/SDL_crc16.c
@@ -25,6 +25,9 @@
/* Public domain CRC implementation adapted from:
http://home.thep.lu.se/~bjorn/crc/crc32_simple.c
+
+ This algorithm is compatible with the 16-bit CRC described here:
+ https://www.lammertbies.nl/comm/info/crc-calculation
*/
/* NOTE: DO NOT CHANGE THIS ALGORITHM
There is code that relies on this in the joystick code
diff --git a/src/stdlib/SDL_crc32.c b/src/stdlib/SDL_crc32.c
index 50568966103..cd7229c9682 100644
--- a/src/stdlib/SDL_crc32.c
+++ b/src/stdlib/SDL_crc32.c
@@ -25,6 +25,9 @@
/* Public domain CRC implementation adapted from:
http://home.thep.lu.se/~bjorn/crc/crc32_simple.c
+
+ This algorithm is compatible with the 32-bit CRC described here:
+ https://www.lammertbies.nl/comm/info/crc-calculation
*/
/* NOTE: DO NOT CHANGE THIS ALGORITHM
There is code that relies on this in the joystick code