Bugfix decoding

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22284 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2006-01-10 20:37:21 +00:00
parent d98714e355
commit fd8bfa11d5
2 changed files with 4 additions and 2 deletions

View file

@ -4,6 +4,8 @@
When calculating info about a structure, make sure its alignment is
that of its most strictly aligned field and make sure its size is a
multiple of its alignment.
* Source/NSData.m: ([initWithCoder:]) Fix bug decoding unsigned long
into unsigned int variable ... breaks on amd64
2006-01-10 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -1770,7 +1770,7 @@ failure:
unsigned length = [self length];
void *bytes = [self mutableBytes];
[aCoder encodeValueOfObjCType: @encode(unsigned long)
[aCoder encodeValueOfObjCType: @encode(unsigned int)
at: &length];
if (length)
{
@ -1802,7 +1802,7 @@ failure:
zone = [self zone];
#endif
[aCoder decodeValueOfObjCType: @encode(unsigned long) at: &l];
[aCoder decodeValueOfObjCType: @encode(unsigned int) at: &l];
if (l)
{
void *b = NSZoneMalloc(zone, l);