Here is a simple patch, which should be obvious by itself. Diff'ed
against base-1.11.1. Please apply.

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:14:18.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: &code length: 4];
+    }
 }
 
 - (void) storeData: (NSData*) data



_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to