From 4035581bdd86c01b294f08d0319e889a40388df5 Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Mon, 1 Sep 2003 18:14:47 +0000 Subject: [PATCH] [readFromURL:options:documentAttributes:] corrected the handling to type "text", where [NSString alloc] was missing. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17595 72102866-910b-0410-8b05-ffd578937521 --- Source/NSAttributedString.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/NSAttributedString.m b/Source/NSAttributedString.m index 296ecffba..7efc3ab43 100644 --- a/Source/NSAttributedString.m +++ b/Source/NSAttributedString.m @@ -1128,12 +1128,14 @@ documentAttributes: (NSDictionary **)dict NSStringEncoding encoding = [[options objectForKey: @"CharacterEncoding"] intValue]; NSDictionary *defaultAttrs = [options objectForKey: @"DefaultAttributes"]; + NSString *str = [[NSString alloc] initWithData: data + encoding: encoding]; NSAttributedString *attr; - attr = [[NSAttributedString alloc] - initWithString: [NSString initWithData: data - encoding: encoding] + attr = [[NSAttributedString alloc] + initWithString: str attributes: defaultAttrs]; + RELEASE(str); [self setAttributedString: attr]; RELEASE(attr);