dlls/user/text.c division by zero
Bill Medland
billmedland at mercuryspeed.com
Thu Jan 30 11:30:07 CST 2003
On January 29, 2003 05:16 am, Christian Kristukat wrote:
> Hi,
> I'm not sure if it's really a bug. It occured while using Microcal Origin.
> Wine crashes after every call of an analysis function, e.g. Peak fitting.
>
> ChangeLog:
> * dlls/user/text.c
> - I added some braces to prevent a division by zero error
Wrong solution; that just makes the problem go away by making it wrong for
everything else.
What does windows do when one passes silly data to GetTabbedTextExtent?
>
> ? patch.diff
> ? dlls/user/text_orig.c
> Index: dlls/user/text.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/user/text.c,v
> retrieving revision 1.43
> diff -u -r1.43 text.c
> --- dlls/user/text.c 8 Jan 2003 21:09:26 -0000 1.43
> +++ dlls/user/text.c 29 Jan 2003 12:41:14 -0000
> @@ -1244,7 +1244,7 @@
> else if (cTabStops > 0)
> tabPos = nTabOrg + *lpTabPos;
> else
> - tabPos = nTabOrg + ((x + extent.cx - nTabOrg) / defWidth + 1)
> * defWidth;
> + tabPos = nTabOrg + ((x + extent.cx - nTabOrg) / (defWidth +
> 1)) * defWidth;
That is a different calculation and is wrong.
> if (fDisplayText)
> {
> RECT r;
--
Bill Medland
ACCPAC International, Inc.
medbi01 at accpac.com
Corporate: www.accpac.com
Hosted Services: www.accpaconline.com
More information about the wine-devel
mailing list