Commit 6158db60 authored by Jon Griffiths's avatar Jon Griffiths Committed by Alexandre Julliard

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

parent 938ab8a6
......@@ -1463,7 +1463,8 @@ VARIANT_FormatNumber_Bool:
while (count-- > 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;
count = min(count_max, have_int);
......
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