From 1a255cc657e23632e2232d3e76b5656b7ba5be98 Mon Sep 17 00:00:00 2001 From: x Date: Sun, 18 Feb 2018 18:20:13 +0100 Subject: [PATCH] BitUtil: c/c++ header --- bitutil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitutil.h b/bitutil.h index 540a89a..9fd8e45 100644 --- a/bitutil.h +++ b/bitutil.h @@ -52,7 +52,7 @@ #define BITSIZE64(_in_, _n_, _b_) BITSIZE_(_in_, _n_, _b_, 64) static inline unsigned char zigzagenc8( char x) { return x << 1 ^ x >> 7; } -static inline char zigzagdec8( unsigned short x) { return x >> 1 ^ -(x & 1); } +static inline char zigzagdec8( unsigned char x) { return x >> 1 ^ -(x & 1); } static inline unsigned short zigzagenc16(short x) { return x << 1 ^ x >> 15; } static inline short zigzagdec16(unsigned short x) { return x >> 1 ^ -(x & 1); }