changeset 744:8a91eba79e74

fix float->int cast
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Fri, 09 Jan 2009 13:47:51 +0100
parents 8c0becf61646
children 525e5fec558a
files src/html.cc
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/html.cc	Fri Jan 09 13:46:18 2009 +0100
+++ b/src/html.cc	Fri Jan 09 13:47:51 2009 +0100
@@ -1948,13 +1948,13 @@
    // TODO: the same for percentage and relative lengths.
    if (width_ptr) {
       l_w = a_Html_parse_length (html, width_ptr);
-      w = (int) CSS_LENGTH_TYPE(l_w) == CSS_LENGTH_TYPE_PX ? 
-                                           CSS_LENGTH_VALUE(l_w) : 0;
+      w = (int) (CSS_LENGTH_TYPE(l_w) == CSS_LENGTH_TYPE_PX ?
+                 CSS_LENGTH_VALUE(l_w) : 0);
    }
    if (height_ptr) {
       l_h = a_Html_parse_length (html, height_ptr);
-      h = (int) CSS_LENGTH_TYPE(l_h) == CSS_LENGTH_TYPE_PX ?
-                                           CSS_LENGTH_VALUE(l_h) : 0;
+      h = (int) (CSS_LENGTH_TYPE(l_h) == CSS_LENGTH_TYPE_PX ?
+                 CSS_LENGTH_VALUE(l_h) : 0);
    }
    if (w < 0 || h < 0 || abs(w*h) > MAX_W * MAX_H) {
       dFree(width_ptr);