diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2012-06-15 08:18:22 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2012-06-15 08:18:22 +0100 |
commit | fa467b9b11fe85762bb6e43d7cd23b388daa6636 (patch) | |
tree | bb5870200f33ff2098b43cb4a749c6a458960b2d /win32/win32.c | |
parent | 4f46e52b008bf955ea3049ad2dc4bfe468842f06 (diff) | |
download | perl-fa467b9b11fe85762bb6e43d7cd23b388daa6636.tar.gz |
Minor fix-ups to 4f46e52b00
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/win32.c b/win32/win32.c index e4968377f8..211ca6f911 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1658,22 +1658,22 @@ win32_getenvironmentstrings(void) /* Get the process environment strings */ lpWTmp = lpWStr = (LPWSTR) GetEnvironmentStringsW(); - for(wenvstrings_len = 1; *lpWTmp != '\0'; lpWTmp += env_len + 1) { + for (wenvstrings_len = 1; *lpWTmp != '\0'; lpWTmp += env_len + 1) { env_len = wcslen(lpWTmp); /* calculate the size of the environment strings */ wenvstrings_len += env_len + 1; } - /* Get the number of bytes required to store the UTF16 encoded string */ + /* Get the number of bytes required to store the ACP encoded string */ aenvstrings_len = WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, - lpWStr, wenvstrings_len, NULL, 0, 0, 0); + lpWStr, wenvstrings_len, NULL, 0, NULL, NULL); lpTmp = lpStr = (char *)win32_calloc(aenvstrings_len, sizeof(char)); if(!lpTmp) out_of_memory(); /* Convert the string from UTF-16 encoding to ACP encoding */ WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, lpWStr, wenvstrings_len, lpStr, - aenvstrings_len, 0, 0); + aenvstrings_len, NULL, NULL); return(lpStr); } |