Fix an off by one error which would crash programs with an open recent

menu.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28860 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2009-10-20 06:03:15 +00:00
parent 24895d987e
commit 9fc52af6f3
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2009-10-20 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSDocumentController.m (-_updateOpenRecentMenu): Fix an
off by one error which would crash programs with an open recent
menu.
2009-10-19 Riccardo Mottola <rmottola@users.sf.net>
* Source/GSWindowDecorationView.h: add method declaration

View file

@ -1630,7 +1630,7 @@ static NSString *processName = nil;
{
[recentMenu removeItemAtIndex: 0]; // remove them all
}
for (i = [_recent_documents count]; i >= -2; i--)
for (i = [_recent_documents count] - 1; i >= -2; i--)
{
// add all items incl. a Clear List item if needed
NSMenuItem *item;