shell32: Include NULL terminators in the lengths used by SHELL_ArgifyW.

This commit is contained in:
Vincent Povirk 2011-07-19 13:22:07 -05:00 committed by Alexandre Julliard
parent 3d81e97c75
commit eeeca57072
1 changed files with 6 additions and 1 deletions

View File

@ -269,7 +269,12 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp
} }
} }
used ++;
if (res - out < len)
*res = '\0'; *res = '\0';
else
out[len-1] = '\0';
TRACE("used %i of %i space\n",used,len); TRACE("used %i of %i space\n",used,len);
if (out_len) if (out_len)
*out_len = used; *out_len = used;