summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2018-07-28 14:59:24 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2018-07-28 14:59:24 +0100
commit73c81840bd830f0d059ddb86948b853324099c00 (patch)
tree33a802693e7492ec562f6d9a85236d5e727a8e24
parent37e328c73949dfaca559abbbd3f3ecf4aff1790c (diff)
downloadlibcss-73c81840bd830f0d059ddb86948b853324099c00.tar.gz
libcss-73c81840bd830f0d059ddb86948b853324099c00.tar.bz2
Fixed point: Squash undefined shift error.
/include/libcss/fpmath.h:86:29: runtime error: left shift of negative value -1
-rw-r--r--include/libcss/fpmath.h2
1 files changed, 1 insertions, 1 deletions
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;