- Bugfix: As szBuf was not null-terminated after the _tcscpy, the Processor Name String could have been wrapped wrong (ie. when it contained more spaces after character 30)

- Use a consistent indentation in SetProcNameString

svn path=/trunk/; revision=27781
This commit is contained in:
Colin Finck 2007-07-22 19:31:29 +00:00
parent 108a7ce988
commit 3087c56ea1

View file

@ -5,7 +5,7 @@
* PURPOSE: General System Information
* COPYRIGHT: Copyright Thomas Weidenmueller <w3seek@reactos.org>
* Copyright 2006 Ged Murphy <gedmurphy@gmail.com>
* Copyright 2006 Colin Finck <mail@colinfinck.de>
* Copyright 2006-2007 Colin Finck <mail@colinfinck.de>
*
*/
@ -156,15 +156,18 @@ SetProcNameString(HWND hwnd,
* With this wrapping the first line looks centered. */
_tcsncpy(szBuf, lpBuf, 30);
szBuf[30] = 0;
szLastSpace = _tcsrchr(szBuf, ' ');
if(szLastSpace == 0)
LastSpace = 30;
else
{
LastSpace = (szLastSpace - szBuf);
szBuf[LastSpace] = 0;
}
_tcsncpy(szBuf, lpBuf, LastSpace);
szBuf[LastSpace] = 0;
SetDlgItemText(hwnd,
uID1,