Yep.
It's still broken though; the string I allocated is too small (strlen excludes the null terminator), and that will be a problem if cmdline ends in a backslash.
Vincent Povirk
On Tue, Oct 21, 2008 at 8:41 PM, Juan Lang juan.lang@gmail.com wrote:
Oops, sorry Vincent, James caught me:
- result = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(WCHAR)*strlenW(cmdline));
The HEAP_ZERO_MEMORY is the something obvious I was missing.
/me slinks back to his corner. --Juan