summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2012-06-15 08:18:22 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2012-06-15 08:18:22 +0100
commitfa467b9b11fe85762bb6e43d7cd23b388daa6636 (patch)
treebb5870200f33ff2098b43cb4a749c6a458960b2d /win32/win32.c
parent4f46e52b008bf955ea3049ad2dc4bfe468842f06 (diff)
downloadperl-fa467b9b11fe85762bb6e43d7cd23b388daa6636.tar.gz
Minor fix-ups to 4f46e52b00
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c8
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);
}