mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-30 08:00:51 +00:00
[libr] Initialize SetIterator the right way
I'd written Set.[rh] after the big rewrite so never noticed the access error.
This commit is contained in:
parent
16223098e5
commit
c2138183dd
1 changed files with 10 additions and 2 deletions
|
@ -27,6 +27,15 @@ string set_as_string (set_t *set) = #0;
|
|||
|
||||
|
||||
@implementation SetIterator: Object
|
||||
- initWithIterator: (set_iter_t *) iter
|
||||
{
|
||||
if (!(self = [super init])) {
|
||||
return nil;
|
||||
}
|
||||
self.iter = iter;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (SetIterator *) next
|
||||
{
|
||||
if ((iter = set_next (iter)))
|
||||
|
@ -84,8 +93,7 @@ string set_as_string (set_t *set) = #0;
|
|||
|
||||
if (!iter)
|
||||
return nil;
|
||||
iterator = [[SetIterator alloc] init];
|
||||
iterator.iter = iter;
|
||||
iterator = [[SetIterator alloc] initWithIterator: iter];
|
||||
return iterator;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue