From 94ecbd89db9b7d1c73beaa06b4b5eaa801d3d67e Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Mon, 5 Jan 2004 15:43:55 +0000 Subject: [PATCH] fixed div/0 bug svn path=/trunk/; revision=7461 --- reactos/subsys/win32k/objects/dc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/win32k/objects/dc.c b/reactos/subsys/win32k/objects/dc.c index aa2e9a53da6..0e89b365023 100644 --- a/reactos/subsys/win32k/objects/dc.c +++ b/reactos/subsys/win32k/objects/dc.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: dc.c,v 1.115 2004/01/04 21:26:59 weiden Exp $ +/* $Id: dc.c,v 1.116 2004/01/05 15:43:55 weiden Exp $ * * DC.C - Device context functions * @@ -2000,8 +2000,8 @@ DC_UpdateXforms(PDC dc) FLOAT scaleX, scaleY; /* Construct a transformation to do the window-to-viewport conversion */ - scaleX = (FLOAT)dc->vportExtX / (FLOAT)dc->wndExtX; - scaleY = (FLOAT)dc->vportExtY / (FLOAT)dc->wndExtY; + scaleX = (dc->wndExtX ? (FLOAT)dc->vportExtX / (FLOAT)dc->wndExtX : 0.0); + scaleY = (dc->wndExtY ? (FLOAT)dc->vportExtY / (FLOAT)dc->wndExtY : 0.0); xformWnd2Vport.eM11 = scaleX; xformWnd2Vport.eM12 = 0.0; xformWnd2Vport.eM21 = 0.0;