oleaut32: fix a rounding bug in VarFormat.
This commit is contained in:
parent
52722e6638
commit
560e76ee38
|
@ -379,6 +379,7 @@ static void test_VarFormat(void)
|
|||
VARFMT(VT_R8,V_R8,-1.57,"0.00",S_OK,"-1.57");
|
||||
VARFMT(VT_R8,V_R8,-1.57,"#.##",S_OK,"-1.57");
|
||||
VARFMT(VT_R8,V_R8,-0.1,".#",S_OK,"-.1");
|
||||
VARFMT(VT_R8,V_R8,0.099,"#.#",S_OK,".1");
|
||||
|
||||
|
||||
/* 'out' is not cleared */
|
||||
|
|
|
@ -1305,7 +1305,10 @@ static HRESULT VARIANT_FormatNumber(LPVARIANT pVarIn, LPOLESTR lpszFormat,
|
|||
else
|
||||
{
|
||||
rgbDig[have_int + need_frac] = 0;
|
||||
have_int++;
|
||||
if (exponent < 0)
|
||||
exponent++;
|
||||
else
|
||||
have_int++;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue