mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:43:04 +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 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 */
|
when the new or opened file has not been edited yet */
|
||||||
if (clearModifyAlert)
|
if (clearModifyAlert)
|
||||||
StringCbPrintf(szCaption, ARRAY_SIZE(szCaption), _T("%s - %s"), szFilename, szNotepad);
|
{
|
||||||
|
StringCbPrintf(szCaption, sizeof(szCaption), _T("%s - %s"),
|
||||||
|
szFilename, szNotepad);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BOOL isModified = (SendMessage(Globals.hEdit, EM_GETMODIFY, 0, 0) ? TRUE : FALSE);
|
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 */
|
/* 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);
|
(isModified ? _T("*") : _T("")), szFilename, szNotepad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue