use _wgetenv instead of getenv on Windows

This commit is contained in:
tildearrow 2022-02-17 23:07:36 -05:00
parent f735617ee3
commit f272f3f3f7
1 changed files with 2 additions and 2 deletions

View File

@ -36,9 +36,9 @@ String getHomeDir() {
char tempDir[4096];
#ifdef _WIN32
char* up=getenv("USERPROFILE");
wchar_t* up=_wgetenv(L"USERPROFILE");
if (up!=NULL) {
ret=up;
ret=utf16To8(up);
ret+='\\';
}
#else