From 73c81840bd830f0d059ddb86948b853324099c00 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 28 Jul 2018 14:59:24 +0100 Subject: Fixed point: Squash undefined shift error. /include/libcss/fpmath.h:86:29: runtime error: left shift of negative value -1 --- include/libcss/fpmath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/libcss/fpmath.h') diff --git a/include/libcss/fpmath.h b/include/libcss/fpmath.h index 2890da2..bed5ee6 100644 --- a/include/libcss/fpmath.h +++ b/include/libcss/fpmath.h @@ -83,7 +83,7 @@ css_multiply_fixed(const css_fixed x, const css_fixed y) { static inline css_fixed css_int_to_fixed(const int a) { - int64_t xx = ((int64_t) a) << CSS_RADIX_POINT; + int64_t xx = ((int64_t) a) * (1 << CSS_RADIX_POINT); if (xx < INT_MIN) xx = INT_MIN; -- cgit v1.2.3