diff --git a/ChangeLog b/ChangeLog index c310e7818..d9b36dbc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/Source/NSData.m b/Source/NSData.m index b54b972c1..0ee5b437c 100644 --- a/Source/NSData.m +++ b/Source/NSData.m @@ -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);