mirror of
https://github.com/reactos/reactos.git
synced 2025-06-13 07:18:30 +00:00
[NOTEPAD] Fix array index use before limits check. By Kudratov Olimjon using Cppcheck. CORE-8978
svn path=/trunk/; revision=67963
This commit is contained in:
parent
7140da34ed
commit
d6a45cb528
1 changed files with 1 additions and 1 deletions
|
@ -1075,7 +1075,7 @@ VOID DIALOG_GoTo(VOID)
|
||||||
SendMessage(Globals.hEdit, EM_GETSEL, (WPARAM) &dwStart, (LPARAM) &dwEnd);
|
SendMessage(Globals.hEdit, EM_GETSEL, (WPARAM) &dwStart, (LPARAM) &dwEnd);
|
||||||
|
|
||||||
nLine = 1;
|
nLine = 1;
|
||||||
for (i = 0; pszText[i] && (i < (int) dwStart); i++)
|
for (i = 0; (i < (int) dwStart) && pszText[i]; i++)
|
||||||
{
|
{
|
||||||
if (pszText[i] == '\n')
|
if (pszText[i] == '\n')
|
||||||
nLine++;
|
nLine++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue