mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 20:43:18 +00:00
[NOTEPAD] StringCbPrintf() need sizeof(), not ARRAY_SIZE() (#2067)
This commit is contained in:
parent
f5ab9cb723
commit
f3af9cfcf1
1 changed files with 5 additions and 2 deletions
|
@ -81,13 +81,16 @@ void UpdateWindowCaption(BOOL clearModifyAlert)
|
|||
/* When a file is being opened or created, there is no need to have the edited flag shown
|
||||
when the new or opened file has not been edited yet */
|
||||
if (clearModifyAlert)
|
||||
StringCbPrintf(szCaption, ARRAY_SIZE(szCaption), _T("%s - %s"), szFilename, szNotepad);
|
||||
{
|
||||
StringCbPrintf(szCaption, sizeof(szCaption), _T("%s - %s"),
|
||||
szFilename, szNotepad);
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOL isModified = (SendMessage(Globals.hEdit, EM_GETMODIFY, 0, 0) ? TRUE : FALSE);
|
||||
|
||||
/* Update the caption based upon if the user has modified the contents of the file or not */
|
||||
StringCbPrintf(szCaption, ARRAY_SIZE(szCaption), _T("%s%s - %s"),
|
||||
StringCbPrintf(szCaption, sizeof(szCaption), _T("%s%s - %s"),
|
||||
(isModified ? _T("*") : _T("")), szFilename, szNotepad);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue