mirror of
https://github.com/corda/corda.git
synced 2025-02-04 18:22:29 +00:00
pass valid pReturnValue parameter to _wgetenv_s
This commit is contained in:
parent
f0c14fa1f1
commit
875a1a45a3
@ -393,7 +393,8 @@ Java_java_lang_System_getProperty(JNIEnv* e, jclass, jstring name,
|
||||
} else if (strcmp(chars, "user.home") == 0) {
|
||||
# ifdef _MSC_VER
|
||||
WCHAR buffer[MAX_PATH];
|
||||
if (_wgetenv_s(0, buffer, MAX_PATH, L"USERPROFILE") == 0) {
|
||||
size_t needed;
|
||||
if (_wgetenv_s(&needed, buffer, MAX_PATH, L"USERPROFILE") == 0) {
|
||||
r = e->NewString(reinterpret_cast<jchar*>(buffer), lstrlenW(buffer));
|
||||
} else {
|
||||
r = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user