From 58d38a26b933c5abe6114ba27b8b1b47ce43fdd6 Mon Sep 17 00:00:00 2001 From: rfm Date: Thu, 9 Jan 2014 09:55:36 +0000 Subject: [PATCH] safety tweak suggested by Quentin git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37564 72102866-910b-0410-8b05-ffd578937521 --- Source/NSArray.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/NSArray.m b/Source/NSArray.m index effd6023e..1a35a98de 100644 --- a/Source/NSArray.m +++ b/Source/NSArray.m @@ -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