From 8bde8b0bb1011e77007cdf81200b00d45b0951db Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Tue, 19 Sep 2000 22:36:30 +0000 Subject: [PATCH] Internal storage fix. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7553 72102866-910b-0410-8b05-ffd578937521 --- Source/GSTextStorage.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/GSTextStorage.m b/Source/GSTextStorage.m index 6fbbd0a67..e01c62817 100644 --- a/Source/GSTextStorage.m +++ b/Source/GSTextStorage.m @@ -73,7 +73,7 @@ GSTextInfo *info = (GSTextInfo*)NSAllocateObject(self, 0, z); info->loc = l; - info->attrs = [a copy]; + info->attrs = [a copyWithZone: z]; return info; } @@ -370,13 +370,14 @@ _attributesAtIndexEffectiveRange( - (NSString*) string { - return textChars; + return AUTORELEASE([textChars copyWithZone: NSDefaultMallocZone()]); } - (NSDictionary*) attributesAtIndex: (unsigned)index effectiveRange: (NSRange*)aRange { unsigned dummy; + return _attributesAtIndexEffectiveRange( index, aRange, [textChars length], infoArray, &dummy); }