Gitweb links:

...log 
http://git.netsurf-browser.org/libcss.git/shortlog/37e328c73949dfaca559abbbd3f3ecf4aff1790c
...commit 
http://git.netsurf-browser.org/libcss.git/commit/37e328c73949dfaca559abbbd3f3ecf4aff1790c
...tree 
http://git.netsurf-browser.org/libcss.git/tree/37e328c73949dfaca559abbbd3f3ecf4aff1790c

The branch, master has been updated
       via  37e328c73949dfaca559abbbd3f3ecf4aff1790c (commit)
      from  1d52e081bc36edef3f8503fae18db0291b186c68 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/libcss.git/commit/?id=37e328c73949dfaca559abbbd3f3ecf4aff1790c
commit 37e328c73949dfaca559abbbd3f3ecf4aff1790c
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    Fixed point: Squash undefined left shift of -ve value error.
    
    include/libcss/fpmath.h:60:27: runtime error: left shift of negative value 
-2611200

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;


-----------------------------------------------------------------------

Summary of changes:
 include/libcss/fpmath.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;


-- 
Cascading Style Sheets library

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to