From 680bf12aece1d36fe4b1083955e678b69730a622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Villac=C3=ADs=20Lasso?= Date: Thu, 22 Sep 2005 10:49:01 +0000 Subject: [PATCH] Fix a scaling error in VarR4FromDec() and VarR8FromDec() that incorrectly multiplies the high 32 bits of the DECIMAL by 1e64 instead of the correct 2^64. --- dlls/oleaut32/vartype.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c index c53d3be4265..ec54eb3020d 100644 --- a/dlls/oleaut32/vartype.c +++ b/dlls/oleaut32/vartype.c @@ -2962,7 +2962,8 @@ HRESULT WINAPI VarR4FromDec(DECIMAL* pDecIn, float *pFltOut) if (DEC_HI32(pDecIn)) { highPart = (double)DEC_HI32(pDecIn) / (double)divisor; - highPart *= 1.0e64; + highPart *= 4294967296.0F; + highPart *= 4294967296.0F; } else highPart = 0.0; @@ -3281,7 +3282,8 @@ HRESULT WINAPI VarR8FromDec(DECIMAL* pDecIn, double *pDblOut) if (DEC_HI32(pDecIn)) { highPart = (double)DEC_HI32(pDecIn) / divisor; - highPart *= 1.0e64; + highPart *= 4294967296.0F; + highPart *= 4294967296.0F; } else highPart = 0.0;