From fc7efc6e4a972c67adb8a1ada287ee3f064d6f1f Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 14 Feb 2011 14:48:56 +0000 Subject: Don't use float maths for AUTO image sizing with one given dimension. svn path=/trunk/netsurf/; revision=11677 --- render/layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'render/layout.c') diff --git a/render/layout.c b/render/layout.c index 3daf35d04..9f2dc88e0 100644 --- a/render/layout.c +++ b/render/layout.c @@ -853,7 +853,7 @@ void layout_get_object_dimensions(struct box *box, int *width, int *height, int intrinsic_height = content_get_height(box->object); if (intrinsic_height != 0) - *width = intrinsic_width * ((float)(*height)) / + *width = (*height * intrinsic_width) / intrinsic_height; else *width = intrinsic_width; @@ -863,7 +863,7 @@ void layout_get_object_dimensions(struct box *box, int *width, int *height, int intrinsic_height = content_get_height(box->object); if (intrinsic_width != 0) - *height = intrinsic_height * ((float)(*width)) / + *height = (*width * intrinsic_height) / intrinsic_width; else *height = intrinsic_height; -- cgit v1.2.3