diff --git a/ChangeLog b/ChangeLog index a495f5089..9b7654718 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-04-12 Richard Frith-Macdonald + + * Source/NSPortCoder.m: + Fix bug looking up class version information. + 2013-04-10 Richard Frith-Macdonald * Source/NSScanner.m: improve the algoritm for parsing double values diff --git a/Source/NSPortCoder.m b/Source/NSPortCoder.m index 5c36b597b..69957068e 100644 --- a/Source/NSPortCoder.m +++ b/Source/NSPortCoder.m @@ -422,7 +422,8 @@ static unsigned encodingVersion; { unsigned count = GSIArrayCount(_clsAry); - while (count-- > 0) + // Zero'th item is nul + while (count-- > 1) { RELEASE(GSIArrayItemAtIndex(_clsAry, count).obj); } @@ -2042,10 +2043,11 @@ static unsigned encodingVersion; } if ([_cInfo count] == 0) { - while (count-- > 0) + // Zero'th item is nul + while (count-- > 1) { info = GSIArrayItemAtIndex(_clsAry, count).obj; - if (info->class != 0) + if (0 != info->class) { [_cInfo setObject: info forKey: NSStringFromClass(info->class)]; }