mirror of https://github.com/FreeRDP/FreeRDP
Fixed GetEnvironmentVariableX: Return sting length including '\0'
This commit is contained in:
parent
952068145e
commit
c99c4cecdd
|
@ -671,7 +671,7 @@ DWORD GetEnvironmentVariableX(const char* lpName, char* lpBuffer, DWORD nSize)
|
|||
|
||||
result = GetEnvironmentVariableW(lpNameW, lpBufferMaxW, nSizeW);
|
||||
|
||||
status = ConvertFromUnicode(CP_UTF8, 0, lpBufferMaxW, _wcsnlen(lpBufferMaxW, nSizeW),
|
||||
status = ConvertFromUnicode(CP_UTF8, 0, lpBufferMaxW, _wcsnlen(lpBufferMaxW, nSizeW) + 1,
|
||||
&lpTmpBuffer, sizeof(lpBufferMaxA), NULL, NULL);
|
||||
|
||||
if (status > 0)
|
||||
|
|
Loading…
Reference in New Issue