Reproduce OSX padding behavior

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38604 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2015-06-08 07:46:02 +00:00
parent 8418d1f6eb
commit 37352097e3

View file

@ -635,6 +635,13 @@ failure:
return nil;
}
}
/* For OSX compatibility, if we have unnecessary padding at the
* end of a string, we treat it as representing a zero byte.
*/
if (0 == pos)
{
*dst++ = '\0';
}
c = -1;
}
else if (options & NSDataBase64DecodingIgnoreUnknownCharacters)