oleaut32: Don't read past the digits array in VARIANT_FormatNumber.

This commit is contained in:
Jon Griffiths 2008-07-06 10:17:16 -07:00 committed by Alexandre Julliard
parent 938ab8a633
commit 6158db6055
1 changed files with 2 additions and 1 deletions

View File

@ -1463,7 +1463,8 @@ VARIANT_FormatNumber_Bool:
while (count-- > 0) while (count-- > 0)
*pBuff++ = '0'; *pBuff++ = '0';
} }
if (*pToken == FMT_NUM_COPY_ZERO || have_int > 1 || *prgbDig > 0) if (*pToken == FMT_NUM_COPY_ZERO || have_int > 1 ||
(have_int > 0 && *prgbDig > 0))
{ {
dwState |= NUM_WRITE_ON; dwState |= NUM_WRITE_ON;
count = min(count_max, have_int); count = min(count_max, have_int);