From 83dfcdf77ac8bbac811d68f557aebfd6c4dc7f74 Mon Sep 17 00:00:00 2001 From: Doug Simons Date: Fri, 20 Jan 2012 01:05:25 +0000 Subject: [PATCH] fix a bug when a dictionary contains non-string values git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34597 72102866-910b-0410-8b05-ffd578937521 --- Source/NSXMLElement.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/NSXMLElement.m b/Source/NSXMLElement.m index 54e75f797..0f14a7e32 100644 --- a/Source/NSXMLElement.m +++ b/Source/NSXMLElement.m @@ -173,7 +173,7 @@ extern void clearPrivatePointers(xmlNodePtr aNode); // [internal->attributes removeAllObjects]; while ((key = [en nextObject]) != nil) { - NSString *val = [attributes objectForKey: key]; + NSString *val = [[attributes objectForKey: key] stringValue]; NSXMLNode *attribute = [NSXMLNode attributeWithName: key stringValue: val]; [self addAttribute: attribute];