Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2014-01-31 07:58:46 +0400
committerOliver Schneider <oliver@assarbad.net>2014-01-31 07:58:46 +0400
commitd9bd6784cb4d2cb09b294c0fcc11878e269f24ee (patch)
treeb66368b12954abe8d6690108cbfb60e96788713a
parent66a36c942fc8c1029afaf94e5ad16f6f1093a8f6 (diff)
Minor glitch ironed out that got lost due to a rollback
-rw-r--r--windirstat/osspecific.cpp4
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))
{