oleaut32: Fix handling of 'c' format for non-date variants in VarTokenizeFormatString.

This commit is contained in:
Alexandre Julliard 2010-06-08 15:34:59 +02:00
parent d77c7d1047
commit a2791a0919
2 changed files with 2 additions and 1 deletions

View File

@ -328,6 +328,7 @@ static void test_VarFormat(void)
VARFMT(VT_I4,V_I4,1,"000###",S_OK,"000001");
VARFMT(VT_I4,V_I4,1,"#00##00#0",S_OK,"00000001");
VARFMT(VT_I4,V_I4,1,"1#####0000",S_OK,"10001");
VARFMT(VT_I4,V_I4,1,"##abcdefghijklmnopqrstuvwxyz",S_OK,"1abcdefghijklmnopqrstuvwxyz");
VARFMT(VT_I4,V_I4,100000,"#,###,###,###",S_OK,"100,000");
VARFMT(VT_I4,V_I4,1,"0,000,000,000",S_OK,"0,000,000,001");
VARFMT(VT_I4,V_I4,123456789,"#,#.#",S_OK,"123,456,789.");

View File

@ -852,7 +852,7 @@ HRESULT WINAPI VarTokenizeFormatString(LPOLESTR lpszFormat, LPBYTE rgbTok,
*pOut++ = FMT_DATE_AMPM_UPPER;
TRACE("AM/PM\n");
}
else if (*pFormat == 'c' || *pFormat == 'C')
else if ((*pFormat == 'c' || *pFormat == 'C') && COULD_BE(FMT_TYPE_DATE))
{
/* Date formats: General date format
* Other formats: Literal