diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2018-07-28 14:51:48 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2018-07-28 14:51:48 +0100 |
commit | 37e328c73949dfaca559abbbd3f3ecf4aff1790c (patch) | |
tree | d7a3bf44f7433467525b66eca945362bfc087d8b | |
parent | 1d52e081bc36edef3f8503fae18db0291b186c68 (diff) | |
download | libcss-37e328c73949dfaca559abbbd3f3ecf4aff1790c.tar.gz libcss-37e328c73949dfaca559abbbd3f3ecf4aff1790c.tar.bz2 |
Fixed point: Squash undefined left shift of -ve value error.
include/libcss/fpmath.h:60:27: runtime error: left shift of negative value -2611200
-rw-r--r-- | include/libcss/fpmath.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libcss/fpmath.h b/include/libcss/fpmath.h index 1e3fa43..2890da2 100644 --- a/include/libcss/fpmath.h +++ b/include/libcss/fpmath.h @@ -57,7 +57,7 @@ css_subtract_fixed(const css_fixed x, const css_fixed y) { static inline css_fixed css_divide_fixed(const css_fixed x, const css_fixed y) { - int64_t xx = ((int64_t)x << CSS_RADIX_POINT) / y; + int64_t xx = ((int64_t)x * (1 << CSS_RADIX_POINT)) / y; if (xx < INT_MIN) xx = INT_MIN; |