From 31d6c193ae74789743547285e9042accc7745676 Mon Sep 17 00:00:00 2001 From: CrackedPixel <5776225+CrackedPixel@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:24:11 -0500 Subject: [PATCH] fix to match other implementations --- src/rcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rcore.c b/src/rcore.c index f2479b7b5..9b3eeee80 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2770,7 +2770,7 @@ unsigned int *ComputeSHA1(unsigned char *data, int dataSize) { msg[dataSize] = 128; // Write the '1' bit unsigned int bitsLen = 8*dataSize; - memcpy(msg + newDataSize, &bitsLen, 4); // Append the len in bits at the end of the buffer + msg[newDataSize-1] = bitsLen; // Process the message in successive 512-bit chunks for (int offset = 0; offset < newDataSize; offset += (512/8))