This commit is contained in:
spx 2012-09-08 10:09:14 -07:00
parent 4cecb4957e
commit 14fb733a8f
2 changed files with 3 additions and 3 deletions

View File

@ -1150,8 +1150,8 @@ INT_PTR CDialogAbout::CTabVersion::OnCommand(WPARAM wParam, LPARAM lParam)
case IDC_ABOUTVERSION_COPY_BUTTON:
{
WCHAR tmpSz[64];
_snwprintf_s(tmpSz, _TRUNCATE, L"%s%s r%i %s (%s)", APPVERSION, revision_beta ? L" beta" : L"", revision_number, APPBITS, APPDATE);
std::wstring text = tmpSz;
int len = _snwprintf_s(tmpSz, _TRUNCATE, L"%s%s r%i %s (%s)", APPVERSION, revision_beta ? L" beta" : L"", revision_number, APPBITS, APPDATE);
std::wstring text(tmpSz, len);
text += L"\nPath: ";
text += Rainmeter->GetPath();
text += L"\nIniFile: ";

View File

@ -331,7 +331,7 @@ std::wstring GetFormattedString(UINT id, ...)
va_end(args);
std::wstring tmpSz(len ? pBuffer : L"");
std::wstring tmpSz(len ? pBuffer : L"", len);
if (pBuffer) LocalFree(pBuffer);
return tmpSz;
}