Small bug fix for index sets.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18928 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2004-03-26 21:56:44 +00:00
parent 9e361f3985
commit dd0beb1657
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2004-03-26 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSIndexSet.m: Check before each usage of _other if it is
actually set.
2004-03-24 Adam Fedor <fedor@gnu.org> 2004-03-24 Adam Fedor <fedor@gnu.org>
* Resources/GNUmakefile: Add Languages/Hungarian. * Resources/GNUmakefile: Add Languages/Hungarian.

View file

@ -460,7 +460,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
} }
else else
{ {
unsigned count = GSIArrayCount(_other); unsigned count = _other ? GSIArrayCount(_other) : 0;
if (count > 0) if (count > 0)
{ {
@ -580,7 +580,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
- (void) addIndexes: (NSIndexSet*)aSet - (void) addIndexes: (NSIndexSet*)aSet
{ {
unsigned count = GSIArrayCount(_other); unsigned count = _other ? GSIArrayCount(_other) : 0;
if (count > 0) if (count > 0)
{ {
@ -701,7 +701,7 @@ static unsigned posForIndex(GSIArray array, unsigned index)
- (void) removeIndexes: (NSIndexSet*)aSet - (void) removeIndexes: (NSIndexSet*)aSet
{ {
unsigned count = GSIArrayCount(_other); unsigned count = _other ? GSIArrayCount(_other) : 0;
if (count > 0) if (count > 0)
{ {