This reverts commit ca1ac248. The size + 1 was being multiplied by sizeof(*LPWSTR), so that wasn't the issue.