mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 23:50:47 +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
d268c27a9e
commit
c65acd8866
2 changed files with 7 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue