mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Improve binary property list creation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22257 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f710f084e9
commit
c0187c4e1d
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-01-07 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSPropertyList.m (BinaryPLGenerator - storeCount:) Handle
|
||||
count > 256*256. Patch by Derek Zhou <dzhou@nvidia.com>.
|
||||
|
||||
2006-01-04 David Ayers <d.ayers@inode.at>
|
||||
|
||||
Bug #15353
|
||||
|
|
|
@ -3270,7 +3270,7 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
|
|||
{
|
||||
unsigned char code;
|
||||
|
||||
if (count <= 256)
|
||||
if (count < 256)
|
||||
{
|
||||
unsigned char c;
|
||||
|
||||
|
@ -3279,7 +3279,7 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
|
|||
c = count;
|
||||
[dest appendBytes: &c length: 1];
|
||||
}
|
||||
else
|
||||
else if (count < 256 * 256)
|
||||
{
|
||||
unsigned short c;
|
||||
|
||||
|
@ -3289,6 +3289,13 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
|
|||
NSSwapHostShortToBig(c);
|
||||
[dest appendBytes: &c length: 2];
|
||||
}
|
||||
else
|
||||
{
|
||||
code = 0x13;
|
||||
[dest appendBytes: &code length: 1];
|
||||
count = NSSwapHostIntToBig(count);
|
||||
[dest appendBytes: &count length: 4];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) storeData: (NSData*) data
|
||||
|
|
Loading…
Reference in a new issue