Use base64 in gnustep property lists

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38953 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2015-08-30 07:28:26 +00:00
parent 3f2fa9ddfe
commit 9aa5d4cd04
2 changed files with 33 additions and 2 deletions

View file

@ -1970,12 +1970,18 @@ OAppend(id obj, NSDictionary *loc, unsigned lev, unsigned step,
}
else if ([obj isKindOfClass: NSDataClass])
{
if (x == NSPropertyListXMLFormat_v1_0)
if (NSPropertyListXMLFormat_v1_0 == x)
{
[dest appendBytes: "<data>\n" length: 7];
encodeBase64(obj, dest);
[dest appendBytes: "</data>\n" length: 8];
}
else if (NSPropertyListGNUstepFormat == x)
{
[dest appendBytes: "<[" length: 2];
encodeBase64(obj, dest);
[dest appendBytes: "]>" length: 2];
}
else
{
const unsigned char *src;