mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
* Source/NSPropertyList.m (GSBinaryPLParser -objectAtIndex:):
Use long long for all integer types. Before we used signed types which resulted wrong values for negative integers. * Source/NSKeyedUnarchiver.m (-_decodeObject:): Handle the string "$null" as nil all the times. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33934 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6b8dc7ef6c
commit
926f3ccb03
3 changed files with 19 additions and 20 deletions
|
@ -259,11 +259,12 @@ static NSMapTable *globalClassMap = 0;
|
|||
GSIArraySetItemAtIndex(_objMap, (GSIArrayItem)obj, index);
|
||||
}
|
||||
|
||||
if (obj == nil)
|
||||
if ((obj == nil) || [@"$null" isEqual: obj])
|
||||
{
|
||||
// Record NilMarker for decoded object.
|
||||
o = GSIArrayItemAtIndex(_objMap, 0).obj;
|
||||
GSIArraySetItemAtIndex(_objMap, (GSIArrayItem)o, index);
|
||||
obj = nil;
|
||||
}
|
||||
|
||||
return obj;
|
||||
|
@ -500,8 +501,8 @@ static NSMapTable *globalClassMap = 0;
|
|||
if (i > INT_MAX || i < INT_MIN)
|
||||
{
|
||||
[NSException raise: NSRangeException
|
||||
format: @"[%@ +%@]: value for key(%@) is out of range",
|
||||
NSStringFromClass([self class]), NSStringFromSelector(_cmd), aKey];
|
||||
format: @"[%@ +%@]: value %ld for key(%@) is out of range",
|
||||
NSStringFromClass([self class]), NSStringFromSelector(_cmd), i, aKey];
|
||||
}
|
||||
#endif
|
||||
return (int)i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue