mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
- 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:
parent
108a7ce988
commit
3087c56ea1
1 changed files with 78 additions and 75 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue