mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
safety tweak suggested by Quentin
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37564 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
521df718a9
commit
58d38a26b9
1 changed files with 4 additions and 4 deletions
|
@ -399,11 +399,11 @@ static SEL rlSel;
|
|||
* iteration. If it changes during the iteration then
|
||||
* objc_enumerationMutation() will be called, throwing an exception.
|
||||
* The abstract base class implementation points to a fixed value
|
||||
* (the instance itsself is guaranteed to exist for as long as the
|
||||
* enumeration process runs), which is fine for enumerating an
|
||||
* immutable array.
|
||||
* (the enumeration state pointer should exist and be unchanged for as
|
||||
* long as the enumeration process runs), which is fine for enumerating
|
||||
* an immutable array.
|
||||
*/
|
||||
state->mutationsPtr = (unsigned long *)self;
|
||||
state->mutationsPtr = (unsigned long *)&state->mutationsPtr;
|
||||
count = MIN(len, [self count] - state->state);
|
||||
/* If a mutation has occurred then it's possible that we are being asked to
|
||||
* get objects from after the end of the array. Don't pass negative values
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue