-be-fix
authorChristian Grothoff <christian@grothoff.org>
Mon, 30 Jan 2012 14:46:22 +0000 (14:46 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 30 Jan 2012 14:46:22 +0000 (14:46 +0000)
src/util/crypto_crc.c

index f86fe56969ba5785ccfc2ad1005253504c687506..ea419bed89a03bff1da2b185a1608c11f6140786 100644 (file)
@@ -129,7 +129,7 @@ GNUNET_CRYPTO_crc16_step (uint32_t sum, const void *buf, size_t len)
   for (; len >= 2; len -= 2)
     sum += *(hdr++);
   if (len == 1)
-    sum += *((unsigned char *) hdr);
+    sum += *((unsigned char *) hdr) & ntohs(0xFF00);
   return sum;
 }