summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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;