diff --git a/include/socks/util.h b/include/socks/util.h index 3a0e268..ee5080d 100644 --- a/include/socks/util.h +++ b/include/socks/util.h @@ -23,7 +23,7 @@ static inline unsigned long long div64_pow2(unsigned long long x, unsigned long static inline unsigned long long absdiff64(unsigned long long x, unsigned long long y) { - return x > y ? y - x : x - y; + return x < y ? y - x : x - y; } extern int16_t host_to_big_i16(int16_t v);