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.
This commit is contained in:
Alex Villacís Lasso 2005-09-22 10:49:01 +00:00 committed by Alexandre Julliard
parent 0ec0f048e6
commit 680bf12aec

View File

@ -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;