[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is the status of NSPropertyListBinaryFormat_v1_0?
From: |
Derek Zhou |
Subject: |
Re: What is the status of NSPropertyListBinaryFormat_v1_0? |
Date: |
04 Jan 2006 14:54:29 -0800 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Sorry, there is a typo in previous patch. Should have tested it before
sending. Resend here.
Derek
Index: gnustep-base-1.11.1/Source/NSPropertyList.m
===================================================================
--- gnustep-base-1.11.1.orig/Source/NSPropertyList.m 2006-01-04
14:05:46.000000000 -0800
+++ gnustep-base-1.11.1/Source/NSPropertyList.m 2006-01-04 14:50:22.000000000
-0800
@@ -3270,7 +3270,7 @@
{
unsigned char code;
- if (count <= 256)
+ if (count < 256)
{
unsigned char c;
@@ -3279,16 +3279,23 @@
c = count;
[dest appendBytes: &c length: 1];
}
- else
+ else if (count < 256 * 256)
{
unsigned short c;
code = 0x11;
[dest appendBytes: &code length: 1];
c = count;
- NSSwapHostShortToBig(c);
+ c = 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