Re: mshtml: fix MSVC build in htmllocation.c
17 Nov
2011
17 Nov
'11
7:41 p.m.
On 11/17/2011 15:18, Thomas Faber wrote:
This removes the use of two Variable Length Arrays. Instead of filling a local buffer, then allocating a new one using SysAllocString[Len], the strings are now directly written to the latter buffer. Note that the 'len' variable in hunk 2 does not need to count in the terminating null in this case because SysAllocStringLen automatically adds one.
- WCHAR buf[url.dwSchemeLength + 1]; + WCHAR *buf; + buf = *p = SysAllocStringLen(NULL, url.dwSchemeLength + 1); memcpy(buf, url.lpszScheme, url.dwSchemeLength * sizeof(WCHAR)); buf[url.dwSchemeLength] = ':'; - *p = SysAllocStringLen(buf, url.dwSchemeLength + 1); You don't need 'buf' variable after that.
5142
Age (days ago)
5142
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nikolay Sivov