diff options
author | Oliver Schneider <oliver@assarbad.net> | 2014-01-31 07:58:46 +0400 |
---|---|---|
committer | Oliver Schneider <oliver@assarbad.net> | 2014-01-31 07:58:46 +0400 |
commit | d9bd6784cb4d2cb09b294c0fcc11878e269f24ee (patch) | |
tree | b66368b12954abe8d6690108cbfb60e96788713a | |
parent | 66a36c942fc8c1029afaf94e5ad16f6f1093a8f6 (diff) |
Minor glitch ironed out that got lost due to a rollback
-rw-r--r-- | windirstat/osspecific.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/windirstat/osspecific.cpp b/windirstat/osspecific.cpp index 94561eb..1d2f833 100644 --- a/windirstat/osspecific.cpp +++ b/windirstat/osspecific.cpp @@ -69,7 +69,7 @@ CString GetCurrentDesktopName() if(!::GetUserObjectInformation(hDesktop, UOI_NAME, NULL, 0, &dwNeeded) && dwNeeded) { CString retval; - dwNeeded /= sizeof(TCHAR) + 1; + dwNeeded += sizeof(TCHAR); LPTSTR buf = retval.GetBuffer(dwNeeded); if(::GetUserObjectInformation(hDesktop, UOI_NAME, buf, dwNeeded, &dwNeeded)) { @@ -89,7 +89,7 @@ CString GetCurrentWinstaName() if(!GetUserObjectInformation(hWinsta, UOI_NAME, NULL, 0, &dwNeeded) && dwNeeded) { CString retval; - dwNeeded /= sizeof(TCHAR) + 1; + dwNeeded += sizeof(TCHAR); LPTSTR buf = retval.GetBuffer(dwNeeded); if(GetUserObjectInformation(hWinsta, UOI_NAME, buf, dwNeeded, &dwNeeded)) { |