From c67ffb925b855ced23256391edb0ca0bb49c314e Mon Sep 17 00:00:00 2001 From: fgsfds Date: Tue, 14 May 2024 22:02:08 +0200 Subject: [PATCH] Updated Server Query Protocol (markdown) --- Server-Query-Protocol.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Server-Query-Protocol.md b/Server-Query-Protocol.md index 405157e..59747e8 100644 --- a/Server-Query-Protocol.md +++ b/Server-Query-Protocol.md @@ -33,8 +33,8 @@ The checksum function used is a variant of CRC16: ``` u16 x; u16 crc = 0xFFFF; -for (u32 i = 0; i < buf.wp; ++i) { - x = crc >> 8 ^ buf.data[i]; +for (u32 i = 0; i < numbytes; ++i) { + x = crc >> 8 ^ bytes[i]; x ^= x >> 4; crc += (crc << 8) ^ (x << 12) ^ (x << 5) ^ x; }