projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[NOTEPAD] Fix array index use before limits check. By Kudratov Olimjon using Cppcheck...
[reactos.git]
/
reactos
/
base
/
applications
/
notepad
/
dialog.c
diff --git
a/reactos/base/applications/notepad/dialog.c
b/reactos/base/applications/notepad/dialog.c
index
82250ee
..
08de728
100644
(file)
--- a/
reactos/base/applications/notepad/dialog.c
+++ b/
reactos/base/applications/notepad/dialog.c
@@
-1075,7
+1075,7
@@
VOID DIALOG_GoTo(VOID)
SendMessage(Globals.hEdit, EM_GETSEL, (WPARAM) &dwStart, (LPARAM) &dwEnd);
nLine = 1;
- for (i = 0;
pszText[i] && (i < (int) dwStart)
; i++)
+ for (i = 0;
(i < (int) dwStart) && pszText[i]
; i++)
{
if (pszText[i] == '\n')
nLine++;