mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Fix small memory access bug found by valgrind.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28102 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bf45641a25
commit
e1ae97f125
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-03-20 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSOutlineView.m (-drawRow:clipRect:): Changed order of
|
||||
expresions in condition to avoid possible access to uninitialized memory.
|
||||
|
||||
2009-03-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSWorksace.m: ([openURL:]) fix to open some app which
|
||||
|
|
|
@ -814,7 +814,7 @@ static NSImage *unexpandable = nil;
|
|||
/* Determine starting column as fast as possible */
|
||||
x_pos = NSMinX (aRect);
|
||||
i = 0;
|
||||
while ((x_pos > _columnOrigins[i]) && (i < _numberOfColumns))
|
||||
while ((i < _numberOfColumns) && (x_pos > _columnOrigins[i]))
|
||||
{
|
||||
i++;
|
||||
}
|
||||
|
@ -826,7 +826,7 @@ static NSImage *unexpandable = nil;
|
|||
/* Determine ending column as fast as possible */
|
||||
x_pos = NSMaxX (aRect);
|
||||
// Nota Bene: we do *not* reset i
|
||||
while ((x_pos > _columnOrigins[i]) && (i < _numberOfColumns))
|
||||
while ((i < _numberOfColumns) && (x_pos > _columnOrigins[i]))
|
||||
{
|
||||
i++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue