Skip to content

Commit

Permalink
Fixed CCArray#copyWithZone
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoquesada committed Jul 25, 2011
1 parent a948f56 commit 80f6dc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -1,6 +1,7 @@
version 1.0.1 - XX-Ago-2011
. [FIX] All: Implicit atomic properties converted to nonatomic
. [FIX] All: Removed deprected code
. [FXI] CCArray: copyWithZone fixed
. [FIX] Director: frames -> totalFrames, and it works as expected. Value is not being reset.
. [FIX] Node: vertexZ returns points, not "pixels"
. [FIX] LabelTTF: don't crash when calling description after dealloc
Expand Down
4 changes: 3 additions & 1 deletion cocos2d/Support/CCArray.m
Expand Up @@ -269,8 +269,10 @@ - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state object

- (id)copyWithZone:(NSZone *)zone
{
NSArray *nsArray = [self getNSArray];
NSMutableArray* nsArray = [[NSMutableArray alloc] initWithObjects:data->arr count:data->num];
CCArray *newArray = [[[self class] allocWithZone:zone] initWithNSArray:nsArray];
[nsArray release];

return newArray;
}

Expand Down

0 comments on commit 80f6dc9

Please sign in to comment.