From ec54fa5b3013d44b3b604b55bd5fbf1136c2ecb8 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 18 Apr 2018 16:08:46 +0200 Subject: [PATCH] fix: crc16 ccitt in utils.lua has been adapted for the new crc16. --- client/scripting.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/scripting.c b/client/scripting.c index e475d38c4..1ad6a7cc4 100644 --- a/client/scripting.c +++ b/client/scripting.c @@ -390,9 +390,8 @@ static int l_crc16(lua_State *L) { size_t size; const char *p_str = luaL_checklstring(L, 1, &size); - //iceman tochange - uint16_t retval = crc16_ccitt( (uint8_t*) p_str, size); - lua_pushunsigned(L, retval); + uint16_t checksum = crc(CRC_CCITT, (uint8_t*) p_str, size); + lua_pushunsigned(L, checksum); return 1; }