Commit 680bf12a authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

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.
parent 0ec0f048
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment